开发者

facebook request parameters

Is there any chance to hand o开发者_运维问答ver a parameter to a facebook tab?


Yes, you can use the app_data parameter of the signed_request. As far as I know, that's currently the only way to do it.

A JSON string containing the content of a query string parameter also called app_data. Usually specified when the application built the link to pass some data to itself. Only available if your app is an iframe loaded in a Page tab.

source: http://developers.facebook.com/docs/authentication/signed_request


With the app_data. Here's an example:

www.facebook.com/pagename?sk=app_12345678910&app_data=%7B%22item1%22%3A%22data%22%7D

$signed_request = $facebook->getSignedRequest();
$obj = json_decode($signed_request['app_data']);
print $obj->{'item1'}; //prints data
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜