How can I integrate Google Plus with iPhone sdk?

后端 未结 4 1749
忘掉有多难
忘掉有多难 2020-12-29 01:00

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.

4条回答
  •  悲哀的现实
    2020-12-29 01:13

    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.

提交回复
热议问题