简体   繁体   English

通过IOS应用程序登录Facebook重定向到空白页

[英]Facebook login via IOS app redirects to blank page

I previously had my IOS app integrated with the Facebook Graph API using the IOS SDK. 我以前使用IOS SDK将IOS应用程序与Facebook Graph API集成在一起。 I recently recreated the app on Facebook and now when it tries to authorize using: 我最近在Facebook上重新创建了该应用,现在尝试使用以下方法进行授权:

[facebook authorize:permissions delegate:self];

My app gets redirected to a blank Facebook page with a cancel button at the top and then I get a callback to the fbDidNotLogin() method in my IOS app. 我的应用程序重定向到空白的Facebook页面,顶部带有一个“取消”按钮,然后在我的IOS应用程序中回调了fbDidNotLogin()方法。

What's wrong? 怎么了?

I tracked it down to line 315 of Facebook.m: 我将其追踪到Facebook.m的第315行:

if (!accessToken) {

It then eventually calls fbDialogNotLogin:NO . 然后,它最终调用fbDialogNotLogin:NO The errorCode and errorReason don't appear to be helpful. errorCode和errorReason似乎没有帮助。

Most likely your access token is expired or you removed the app from your facebook. 您的访问令牌很可能已过期,或者您已从Facebook中删除了该应用程序。 You can log what error is returning to you from facebook to find out. 您可以记录从Facebook返回的错误消息以进行查找。 In any case if you get to fbDidNotLogin implementation you need to remove access token details from NSUserDefaults (if you store it there) and reauthorize. 无论如何,如果要实现fbDidNotLogin,则需要从NSUserDefaults中删除访问令牌详细信息(如果将其存储在其中)并重新授权。

hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM