Reputation: 17478
I have tried a few solutions and I cannot seem to retrieve the "app_data" that I am passing to my facebook tab page.
UPDATE---------------- For my tabbed page I am using the following and it is not working:
// Connect to Facebook
$facebook = new Facebook(array(
'appId' => $FB_APP_ID,
'secret' => $FB_APP_SECRET
));
$signed_request = $facebook->getSignedRequest();
echo ($signed_request["app_data"]);//Nothing is output here!
Upvotes: 1
Views: 1238
Reputation: 64
$facebook = new Facebook(array(
'appId' => '$testapp_id',
'secret' => '$testapp_skey',
'cookie' => true
));
$signed_request = $facebook->getSignedRequest();
$page_id = $signed_request["page"]["id"];
$page_admin = $signed_request["page"]["admin"];
$like_status = $signed_request["page"]["liked"];
$country = $signed_request["user"]["country"];
$locale = $signed_request["user"]["locale"];
$fanpagid =$page_id;
try {
$page_info = $facebook->api("/".$page_id."?fields=link");
}catch(Exception $o) {
}
$fanpage=$page_info["link"];
$fullpageurl=$fanpage."?sk=app_".$app_id;
try with this code ......
Upvotes: 0
Reputation: 43816
app_data
in the signed_request
is for page tab apps,
For regular canvas apps the values should be available as just $_REQUEST['app_data']
Upvotes: 1