如何在 Facebook Connect iPhone 上恢复会话

发布于 2024-07-30 08:18:27 字数 344 浏览 7 评论 0原文

我在我们的一款应用程序中使用 iPhone 版 Facebook Connect。 当用户使用 FBLoginDialog 登录时,我们将 iPhone 的 session_secret 传递给服务器,然后我们的服务器就可以访问 facebook 的所有功能。

然而,当我们使用 [sessionresume] 时,即使它返回 true,[session isConnected] 返回 true 并且我们获得了 session_secret,我们所有的 Facebook 调用都会失败,就像我们没有登录 Facebook 一样。

在 iPhone 版 Facebook Connect 中使用 [会话恢复] 的正确方法是什么?

I'm using Facebook Connect for the iPhone in one of our applications.
When the user logs in using FBLoginDialog, we pass the iPhone's session_secret to the server and our server then has access to all of facebook's functionality.

However, when we use [session resume], even though it returns true, [session isConnected] returns true and we're getting a session_secret, all of our Facebook calls fail as if we weren't logged on to Facebook.

What is the correct way to use [session resume] in Facebook Connect for the iPhone?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

没有心的人 2024-08-06 08:18:27

如果您正在运行模拟器,请小心在 Safari 中登录 Facebook,因为它与模拟的 Mobile Safari 共享 cookie 等。 清空 Safari 的缓存为我解决了这个问题。

If you're running the simulator, be careful about being logged in to Facebook in Safari, which shares cookies and such with the simulated Mobile Safari. Emptying Safari's cache fixed this for me.

夜夜流光相皎洁 2024-08-06 08:18:27

我们开发了一个类来简化原始 Facebook Connect,创建一个持续存在于所有应用程序对象上的单个会话对象。 还为您提供执行登录、注销和发布提要等简单任务的简单方法。

一个例子是实现一个简单的登录,只需调用会话对象上的登录方法:

[fbsession login];

此代码将打开一个 Facebook Connect 对话框,并询问您的用户登录名和密码。 如果登录成功,有关此会话的所有信息都将被存储,并且可以在应用程序的任何点轻松访问。

您可以在此处下载并查看所有文档:http://code.google.com/ p/fbconnectsession/wiki/关于

We have developed one class that simplify the original Facebook Connect, creating one single session object that persist on all your applications objects. Also giving to you simple methods to execute simple tasks as login, logout and publish feeds.

One example is to implement a simple login, just call the login method on your session object:

[fbsession login];

This code will open a Facebook Connect dialog and ask your user for the login and password. If the login is sucessfull, all information about this session will be stored and easily acessible on any point of your application.

You can download and see all the documentation here: http://code.google.com/p/fbconnectsession/wiki/About

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文