Facebook Canvas 多个页面?
是否无法在 Facebook 画布上的页面之间移动?
我正在尝试创建一个应用程序,其中有两个用户可以在两个页面之间切换的页面。第一页工作正常,但是当我单击第一页上的链接进入下一页时,会话似乎无效。我得到:
“FacebookRestClientException”,消息为“会话密钥无效或不再有效”
这是为什么?我做错了什么?
当我遇到异常时我想做的是:
$user_details = $fb->api_client->users_getInfo($fb_user, 'last_name, first_name','hometown_location','current_location');
Is it not possible to move between pages in the canvas on facebook?
I'm trying to create a app where i have two pages that the users can switch between. The first page works fine, but when i click a link on the first page to get to the next page it seems like the session is made invalid. I get:
"FacebookRestClientException' with message 'Session key invalid or no longer valid'"
Why is this? What am i doing wrong?
What i'm trying to do when i get the exception is this:
$user_details = $fb->api_client->users_getInfo($fb_user, 'last_name, first_name','hometown_location','current_location');
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它工作得很好(我一直这样做,尽管是在 Java 中)。
也许第二页忘记在第二页中正确设置 fb 客户端。
您可以随时查找
fb_sig_session_key
参数以确保其正确发送。该信息通过 POST 传递到 FBML 页面,并通过 GET 传递到 iframe 画布页面。另外,您必须始终将链接引用到http://app.facebook.com/yourcanvas/relurl
用于要传递的会话密钥。It works fine (I do it all the time, albeit in Java).
Perhaps the second page forgets to setup the fb client correctly in the second page.
You can always look for
fb_sig_session_key
parameter to ensure it is being sent correctly. This is passed via POST to FBML pages and via GET to iframe canvas pages. Also, you must always refer links tohttp://app.facebook.com/yourcanvas/relurl
for the session key to be passed.