dounielong7728 2012-01-18 23:40
浏览 56
已采纳

使用静态HTML应用程序获取getSignedRequest()?

I have an app called static HTML (https://apps.facebook.com/static_html_plus/?ref=ts) installed on a page of mine..

I want to be able to access getSignedRequest() to pass data through the URL in facebook using app_data.. (I want to be able to pass an item id to activate a JS item in the iframe.. in essence allowing me to link to an expanded JS feature in the page)

The issue is that i am recieving NULL from getSignedRequest(); I am not sure if the app I am using (mentioned above : static HTML) is stopping the information from getting passed through to my iframe. If you are unfamiliar with this app, it allows you to put HTML/CSS/JS to embed an iframe.

On the hunch that it is the app that is stopping the propagation of the facebook data to my iframe, I have attempted to follow SEVERAL tutorials, both video and written that try to create a facebook iframe by creating a custom app.. none have worked, and i have not been successful in even adding a BASIC TAB to any of my pages..

I am about to give up on this facebook thing as every tutorial I have found has a completely different looking interface or set of instructions then what is ACTUALLY available on the facebook developers page..

Does anyone have a CLEAR UP-TO-DATE, non-facebook written walk-through, or atleast know if my use of the static HTML app is what is causing me to recieve null in my getSignedRequest()?

Here is my php code in the iframe i embed in the static HTML app, incase you think the error is in there somewhere.

require 'facebook.php';

//facebook signed app_data
$app_id = "xxxxxx";
$app_secret = "xxxxxxxxxxx";
$facebook = new Facebook(array(
    'appId' => $app_id,
    'secret' => $app_secret,
    'cookie' => true
));

// Get contents of signed request

$signed_request = $facebook->getSignedRequest();

Any help would be nice. I have wasted 2 nights on this crap.

  • 写回答

1条回答 默认 最新

  • doq1969 2012-01-18 23:58
    关注

    .html files cannot accept HTTP POSTs unless the web-server is configured to accept this verb. However, the only way to get at the post parameters is with server-side code and cannot be done clientside.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题