How can I integrate Google Plus with iPhone sdk?

后端 未结 4 1626
忘掉有多难
忘掉有多难 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.

    0 讨论(0)
  • 2020-12-29 01:23

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

    Try this

    0 讨论(0)
  • 2020-12-29 01:28

    You need to use Google plus API.

    0 讨论(0)
  • 2020-12-29 01:28

    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 讨论(0)
提交回复
热议问题