fbDidLogin从未调用(facebook-ios-sdk) [英] fbDidLogin never called (facebook-ios-sdk)

查看:121
本文介绍了fbDidLogin从未调用(facebook-ios-sdk)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用弹出的Facebook对话框进行用户登录,并在他/她的流上发布帖子

I'm using a pop up Facebook dialog for the user login and the publishing of a post on his/her stream

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: apiKey, @"api_key", nil];
[facebook dialog:@"stream.publish" andParams:params andDelegate:self];

它可以工作,但是当用户登录fbDidLogin方法从未被调用。
为什么?
这样,我无法请求用户名,访问令牌始终为空。

It works, but when the user logs in the fbDidLogin method is never called. Why? In this way I can't request the user name and the access token is always null.

编辑

有了October facebook api,我部分解决了我的问题。

With the october facebook api I have in part resolved my problem.

推荐答案

只是有同样的问题,解决了它。您需要实现

I just had the same problem and solved it. You NEED to implement

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url

然后将来自您的应用程序委托的呼叫直接引导到Facebook负责的任何控制器。

in your app delegate class, not your custom UIViewController or any other class. Then direct the call from your app delegate to whatever controller is responsible for your Facebook.

这篇关于fbDidLogin从未调用(facebook-ios-sdk)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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