English 中文(简体)
Facebook 签名请求在重新装入后为空
原标题:Facebook Signed Request empty after reload

我对我的Facebook应用程序的签名请求书有异议。 第一次是好的,我知道用户是否喜欢我的应用程序。 但当我重新加载应用程序(链接、表格等)时,我解开了签名请求书(只有刷新 [F5],与工作不同 ) 。

我真不明白为什么?

links 不再工作 : (

在应用程序上,您可以看到 $facebook,$_REQUEST 和$_SERVER 信息。

感谢大家的时间和帮助。

最佳回答

签名请求在 Facebook 转介信头中。 它不是从链接到链接的保存, 因为随后的转介将会来自您自己的页面 。 使用签名请求获取一些信息, 并在您之间的会话中保留此信息 。

问题回答

You are just one time able to get the signed_request. That is exactly when Facebook loads your App in an iframe. Then you must have to save the signed_request for further usage (subpages). There you have to check for the data via $_REQUEST or fall back to your stored signed_request values. Here is an small example of the fbHelper component. I hope this might give you some ideas how to handle the issue:

资料来源:http://www.facebook.com/HelperComponentlcomunity/ap_41292314202609' rel=“nofollow”>http://www.facebook.com/HelperComponentlCommunity/ap_41292314202609

    if(array_key_exists( signed_request , $_REQUEST))
        $signed_request = $_REQUEST[ signed_request ];
    elseif(array_key_exists( signed_request  . $this->pageId, $_SESSION))
        $signed_request = $_SESSION[ signed_request  . $this->pageId];
    else
        return false;

    $facebook_data= $this->parse_signed_request($signed_request);




相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签