I have a facebook iframe application not a fan page.
When i use this code it prints well
$signed_request = $facebook->getSignedRequest();
print_r($signed_request);
it prints:
Array (
[algorithm] => HMAC-SHA256
[expires] => 1341475200
[issued_at] => 1341470027
[oauth_token] =>...
[user] =>
Array (
[country] => tr
[locale] => en_US
[age] => Array ( [min] => 21 )
)
[user_id] => ...
)
But when i change the url in adress bar like https://apps.facebook.com/myappname/?app_data=hello
and push enter it doesn't prints app_data=hello parameter in array. How can i print it?
My application is iframe app. look at this pic You can go to my app http://apps.facebook.com/gayriciddi/ and click links on homepage and see
$view = empty($_GET['view']) ? 'home' : $_GET['view'];
echo '<br />'.$view;
$testid = $_REQUEST['testid'];
echo '<br />'.$testid.'<br />';
codes are work or not
.
my index.php:
<?php
include ('config.php');
include ('db_fns.php');
header('Content-type: text/html; charset=UTF-8');
print_r($fbme);
$controller = 'page';
$view = empty($_GET['view']) ? 'home' : $_GET['view'];
echo '<br />'.$view;
$testid = $_REQUEST['testid'];
echo '<br />'.$testid.'<br />';
$signed_request = $facebook->getSignedRequest();
print_r($signed_request);
//includes home.php
include(WEBSITE_ROOT.'/views/'.$controller.'.php');
?>
my home.php:
<table width="601" border="0">
<?php foreach($testler as $key => $test){?>
<tr>
<td width="53"> </td>
<td width="420"><a href="<?=FB_BASE_URL?>?view=acilis&testid=<?=$test['id']?>" target="_top"><?php echo $test['ad'];?></a></td>
<td width="50"> </td>
<td width="50"> </td>
</tr>
<?php } ?>
</table>