How do social apps like buffer posts to googe plus profile

104 views Asked by At

I have been reading google+ API and domain API and found out that google+ API are read-only. And domain API is only for domain users. But somehow I just tried buffer, connected my google+ profile and shared some text. It appeared in the posts section. Now my profile was not a part of a domain, it was [email protected]. Also, there are other social products which give the same functionality.

How do this work?

2

There are 2 answers

4
Nilesh Deokar On

Your app can share post on the behalf of the user on Google plus. All you need to do is take the appropriate permission from the user.

https://www.googleapis.com/auth/plus.stream.write Required - Grants permission for the app to create posts or comments on behalf of a user. The Google+ Domains API only allows creation of restricted posts, and only allows comments to be added to restricted posts.

Ref : https://developers.google.com/+/domains/posts/creating

3
Seth Bergman On

There is an open authentication specification called oAuth that utilizes public api's, for instance: GitHub. Facebook, LinkedIn, Twitter, Google, Slack, etc. I believe the easiest way to implement this strategy is either with a bot, webhook, or my choice api framework Express.

Express has a middleware library called Passport that enables a quick setup of the necessary steps to implement the correct api keys, secrets and callbacks. Essentially what you have to do is create an app with each provider and they will give you the api information necessary for your Passport configuration.

Once you've got that done, then you just hook up a simple router and server, then you've got an app that can allow your users to sign into whichever provider they choose. The beauty behind the solution is their password information is serialized inside a JSON store to prevent security issues.

https://developers.google.com/+/web/api/rest/