How to change google plus profile picture using google api Javascript SDK - google-apps-script

I'm trying to build a Google+ App which uploads profile picture Using API JavaScript SDK. Is there any way to upload Google+ profile picture?

There is no Google+ api that is available to developers. If you are working within your own domain you can do this with the Google Directory Api.
var newPhoto = AdminDirectory.newUserPhoto().photoData = (Utilities.base64Encode(photoBlob));
AdminDirectory.Users.Photos.update(newPhoto, "user#myDomain.org");

Related

Does Google Drive API have a api to show the upgrade link?

Does Google Drive API have an api to show the storage upgrade link?
I mean a link which can let user to buy more space.
Like Google One, https://one.google.com/plans
Thanks.
The google drive api is a file storage api. It gives you access to the data beind the google drive web application. It does not give you any control over the google drive web application itself.
Upgrade storage link is outside the scope for this api.

Publish a site created on the new Google Sites through the API?

I really love the new Google Sites!
Is there a way to Publish Sites through an API? It's great that we can create and share new Google Sites using the Google Drive API, but I can't see a way to publish a site using the API yet.
Is this feature available, or is there a plan to expose some functionality of the new Google Sites through an API?
The feature for Publishing Website is deprecated through Drive API. However, you can use Google Sites API which allows client application to access and modify Google Site data using Google Data API feeds. Using the API, applications can create and modify the content of a Google Site, upload and download attachments, review the revision history across a Site, and display recent user activity.
There is a single supported version of the Sites Data API. The documentation includes a guide for each supported way to use the API:
Java
Python
HTTP/XML (Protocol)

How to use google maps simple api on localhost

I have requested a link for embedding google maps on my website on
https://developers.google.com/maps/documentation/embed/start
and have authorized everyone with the link to use it
Referers: Any referer allowed
https://code.google.com/apis/console/
but I still receive a
The Google Maps API server rejected your request. This API project is not authorized
to use this API. Please ensure that this API is activated in the APIs Console:
Learn more: https://code.google.com/apis/console
Is there some other way to test my website locally with embedded google maps?
EDIT:
They say:
Easy embedding
Google Maps Embed API maps are easy to add to your webpage—just set the URL
you build as the value of an iframe's src attribute. Control the size of the
map with the iframe's height and width attributes. No JavaScript required.
but I still can't access the link.
The problem was that they have their "quick start" out of date.
https://developers.google.com/maps/documentation/embed/start
It says you should only provide them with your API key but the thing is that there is a new version of the same website which they don't have links to from their guide but which you get a link to elsewhere( I got offered when in "billing" )
The new service is called Cloud Console and I found the API on/off buttons there.
https://console.developers.google.com/project/...
You have to enable the "Static Maps API", "Google Maps API" and "Google Maps Embed API" and make sure to have your link in an iframe div
As Dominik said, go here:
https://console.developers.google.com/project/%your-project-name%/apiui/apis/library?q=google%20maps
Enable both APIs:
Google Maps Embed API
Static Maps API
Then go here:
https://console.developers.google.com/project/%your-project-name%/apiui/credential
Create New Key
Browser Key
And you're done.
I also had to enable the Google Maps JavaScript API.

Upload File to Drive Remotely

I was trying to upload files to google drive from a Desktop Application, but i couldnt find how to do it with Google Drive API since that is based for google browser apps. For this matter should i use Google Drive API or Documments API?
You can use both Drive API or Documents List API to achieve, but the Drive API has the additional requirement that Apps need to be installed (for now) from the Chrome Web Store. Once installed, if you authorize the user with OAuth 2.0, you can use the Drive API in a desktop app.

Image Thumbnails from Google Drive API

I was wondering if the Google Drive API is going to generate multiple Thumbnail images for uploaded Photos to Google Drive in the near future. I am a developer of Cloud Photos (iOS App), and our integration with Dropbox and Facebook (coming soon) is powered by these thumbnail images generated for each photo uploaded to their service. I know we are very interested in integrating Google Drive, and generating thumbnails for uploaded Images would allow many developers with photo based apps to integrate with Google Drive.
This is not currently supported but something we could add in the future with a Picasa/Drive integration. There are no finite plans to implement this at the moment though.
Thanks for the feature request and for the feedback!