Facebook 连接问题
我正在开发一个应用程序,它为用户提供了使用 facebook connect 共享提要的选项。我被困在开始本身。我下载了 FBConnect sdk 并按照文档中的说明实现了代码。现在,当在应用程序中触摸 fconnect 按钮时,将打开 facebook 登录页面,而不是打开连接页面来授予应用程序权限。登录此页面会将用户引导至 Facebook 主页。 Facebook 窗口永远不会关闭,并且应用程序未获得许可。
请帮我解决这个问题。
I am developing an application, which gives the user an option to share feeds using facebook connect. I am stuck at the start itself. I dowloaded the FBConnect sdk and implemented the code as explained in the documentation. Now when the fconnect button is touched in the application, instead of connect page opening, to grant the application permission, the facebook login page opens. Signing on to this page directs the user to facebook home. The facebook window never closes and the application doesn't get permission.
Please help me on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此行为是由于
[FBSession session]
不是有效会话导致的。我遇到了这个问题,结果是因为会话对象已被释放。当您通过调用 [FBSession setSession:session] 设置全局会话或初始化任何 FBSession 对象时,FBSession 不会按应有的方式保留它,因此请确保保留会话对象,即使您实际上并不使用它,甚至不保留对它的引用。如果会话存在,请确保您的 API 密钥和密码正确。
This behavior is caused by
[FBSession session]
not being a valid session.I had this problem and it turned out to be because the session object had been deallocated. When you set the global session by calling
[FBSession setSession:session]
or if you initialize any FBSession object, FBSession doesn't retain it as it should, so make sure you retain the session object even if you don't actually use it or even keep a reference to it. If the session is there, make sure your api key and secret are correct.