iOS Google Plus API - 共享或登录,无需转到Safari [英] iOS Google Plus API - Sharing or Logging In without going to Safari

查看:126
本文介绍了iOS Google Plus API - 共享或登录,无需转到Safari的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我在这个问题上找到的一切,都是一个NO。

当用户登录并共享时,我的应用程序工作正常,但这两种操作都需要移动Safari,这对用户来说并不理想,因此任何人都找到了方法使用UIWebView或GET / POST?共享帖子或登录Google +。



任何帮助都将不胜感激。



谢谢。

解决方案

您可以通过Google+登录到UIWebView。

  GTMOAuth2ViewControllerTouch * _googlePlusCtrl = [[GTMOAuth2ViewControllerTouch alloc] 
initWithScope:@https://www.googleapis.com/auth/userinfo.profile https: //www.googleapis.com/auth/plus.me
clientID:GOOGLE_PLUS_CLIENT_ID
clientSecret:GOOGLE_PLUS_CLIENT_SECRET
keychainItemName:@GooglePlus_Sample_App
委托:self
finishedSelector:@selector(viewController:finishedWithAuth:error :)];

希望这会对您有所帮助。


So far everything I've found on the subject, is a NO.

My app works fine when the user logs in and shares, but both actions require mobile safari, which is a less than ideal experience for the user, has anyone found a way to either share a post or log in to Google + using a UIWebView or GET/POST?.

Any help will be greatly appreciated.

Thanks.

解决方案

You can SignIn via Google+ into UIWebView.

 GTMOAuth2ViewControllerTouch *_googlePlusCtrl = [[GTMOAuth2ViewControllerTouch alloc]
                                                   initWithScope:@"https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.me"
                                                   clientID:GOOGLE_PLUS_CLIENT_ID
                                                   clientSecret:GOOGLE_PLUS_CLIENT_SECRET
                                                   keychainItemName:@"GooglePlus_Sample_App"
                                                   delegate:self
                          finishedSelector:@selector(viewController:finishedWithAuth:error:)];

Hope this will help you.

这篇关于iOS Google Plus API - 共享或登录,无需转到Safari的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆