1

I want to integrate google plus in my application,but I dont know from where to start,so if any one having idea about this please reply me.

vishwa
  • 149
  • 1
  • 3
  • 9
  • 1
    possible duplicate of [Google plus api for posting on wall like facebook](http://stackoverflow.com/questions/7857812/google-plus-api-for-posting-on-wall-like-facebook) – Brad Larson Nov 20 '11 at 21:27

4 Answers4

5

Follow this as the basis -> https://developers.google.com/+/api/

1) Go to https://code.google.com/apis/console and request for an API key for yourself to be able to access google plus.

2) Then, check the "Fetching JSON Over HTTP" part in this link for how to integrate google plus into your iOS app. It worked for me. However, google currently gave only GET permission, so I don't think we can post updates using this to googleplus, sadly.

3) Then, your code might look like

-(void)viewDidLoad
{
    [super viewDidLoad];

    responseData = [[NSMutableData data] retain];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.googleapis.com/plus/v1/people/{userId}?key={your-api-key}"]];
    [[NSURLConnection alloc] initWithRequest:request delegate:self];
}

Let me know if you still have doubts.

ilight
  • 1,622
  • 2
  • 22
  • 44
2

You need to use Google plus API.

Ankur
  • 33,367
  • 2
  • 46
  • 72
  • actually I am looking for sample code.can you help me for that? – vishwa Oct 24 '11 at 06:43
  • I ain't a objective-C developer, but check out on google if you could find a objective-C library for accessing the Google+ API, otherwise you will have to call the REST endpoints directly – Ankur Oct 24 '11 at 06:49
  • For a simple signin and share snippet i wrote this code https://github.com/NasirMalik/GooglePlusShare – NaXir Dec 30 '13 at 12:00
  • @NaXir Do you know how you can get the Sign In to happen within a UIWebView within the application rather than using Safari? – Supertecnoboff Jun 20 '14 at 12:18
  • @Supertecnoboff i read the documentation and there wasn't any such option to login via webView. It will take u to the mobile safari or Google+ app if present on your device. – NaXir Jun 24 '14 at 04:31
0

Visit the G+ iOS integration page: https://developers.google.com/+/quickstart/ios

You can find examples on how to integrate your app with the G+ SDK, how to add a "Sign in with Google+" button, and how to get user information.

For a complete sample you can checkout the "PhotoHunt" sample application: https://developers.google.com/+/photohunt/

0

Here is a small sample code to start with. You can share a text and an image url etc via this code.

Try this

NaXir
  • 2,373
  • 2
  • 24
  • 31