Google Plus API for Posting on Wall Like Facebook

Google plus API for posting on wall like Facebook

As it turns out there are only a limited number of api's available for google + developers and that also only as GET calls according to the developer of google + page my question will not get any definite answers as google is in the process of creating new api's for accessing user information on google plus.

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

Also you can use the google client sdk provided by google but it is much easier to show a webview for user login. I managed to get the people list from google plus.

The steps are same as for getting the access token as in foursquare. Just with some small changes.

in viewdidload method.

NSString *authStr = @"https://accounts.google.com/o/oauth2/auth?client_id=client_id&redirect_uri=http://somevalidurl.com&scope=https://www.googleapis.com/auth/plus.me&response_type=token";

as a url for loading request in webview. People should note one thing here that you need to create a client id in api console for your app that is web based and not as installed for this purpose as you wont we getting any option to enter any website url for callback which is very important in this case.

and in webview delegate method webViewDidFinishLoad:

NSString *urlStr = [[webView.request URL] absoluteString];
NSArray *array = [urlStr componentsSeparatedByString:@"access_token="];
if(array.count > 1)
{
NSString *oauth_token = [[[array objectAtIndex:1] componentsSeparatedByString:@"&"] objectAtIndex:0];
//do something with the oauth token after this.
}

How to post in Google+ wall

Well, Google+ doesn't have a "wall," it has "Streams." The proper term might help you find better search results. Either way, unless you're a Google partner, the news isn't good:

The API is currently limited to read-only access. From the API website:

Note: The Google+ API currently provides read-only access to public
data. All API calls require either an OAuth 2.0 token or an API key.

Because it's read-only, you will not be able to update or post any information anywhere through the API -- you can only use it to pull basic information like profile and activity details.

Given that access to the API may change over time, I'll try to keep this answer up to date with information about news or changes related to write access.



News & Updates

2015-04-28: Google+ Domains API was announced way back in August 2013, but somehow I missed its relevance to Google+.

The Google+ Domains API allows Google Apps customers and ISVs to take advantage of enhanced Google+ APIs to build tools and services that can be used in a variety of ways.

No, it does not provide full write access to a user's Google+ profile, but it does give you minor advantages over the Google+ API v1, at least within a domain. This one's mainly for mobile app developers.

2015-01-21: I have revisited many of the sources linked in this answer and searched for news regarding API changes, but Google has been quiet.

2014-03-12: Various discussion threads on Google+ about write access (or lack thereof):

  • Discussion thread by Jeff Dwyer
  • In-depth discussion of the topic by Thor Mitchell (the Google+ team member mentioned in Update 6)

2013-12-03: The issue thread from UPDATE 1 has finally been responded to by a Google+ project member. Additional discussion regarding write-access to Streams is taking place intermittently on the Developing with Google+ community page.

2013-07-05: A developer named Eric Leroy has built an "unofficial" JavaScript library that provides read/write extension to the Google+ API.

  • via Google+ XHR Hack = w+ (Add/Post)

2013-05-14: A "social media management company" can gain additional API access by attempting to become a Google+ Pages API Partner.

  • Google+ Pages API Partner Application Form
  • More third party tools to help manage your Google+ page - An announcement from Eduardo Thuler
  • Original Google announcement of third party management tools

Here's an excerpt from the Partner Application Form:

The Google+ pages API allows social media management companies to add Google+ page management features into their tool. Access to this API is available through a whitelist, and access is granted to partners on a company by company basis dependent on fit with this API.

Other articles explaining the lack of a write API:

  • http://mashable.com/2012/08/02/google-to-developers-wont-screw-you/

2013-01-04: Google just announced Google+ History. You can use it to write "moments" (which are private by default) but can then be made public by sharing them directly to your stream and/or your profile. One of the moment types is CommentActivity.

2012-10-08: There's now a duplicate bug post with only a few comments, but you can check there for future updates as well.

2012-06-25: I came across the issue tracker post for Google+ Write Access. The enhancement request status is "New" and priority is "Medium" as of June 25th, 2012. There are some links of interest in the comments.

Getting private posts from Google+ using APIs

This is not currently available.

You may wish to star (and thus follow) this issue to indicate you would like to see this as a feature and to track progress or responses from Google.

Does google plus api allows posting status?

Simply NO. I was also searching for the same earlier in summer & all in vain.



Related Topics



Leave a reply



Submit