我有一个 facebook iframe 应用程序而不是粉丝页面。
当我使用此代码时,它打印得很好
$signed_request = $facebook->getSignedRequest();
print_r($signed_request);
它打印:
Array (
[algorithm] => HMAC-SHA256
[expires] => 1341475200
[issued_at] => 1341470027
[oauth_token] =>...
[user] =>
Array (
[country] => tr
[locale] => en_US
[age] => Array ( [min] => 21 )
)
[user_id] => ...
)
但是,当我更改地址栏中的 urlhttps://apps.facebook.com/myappname/?app_data=hello
并按下回车时,它不会在数组中打印 app_data=hello 参数。我怎样才能打印它?
我的应用程序是 iframe 应用程序。看看这张照片你可以去我的应用程序http://apps.facebook.com/gayriciddi/然后点击主页上的链接看看
$view = empty($_GET['view']) ? 'home' : $_GET['view'];
echo '<br />'.$view;
$testid = $_REQUEST['testid'];
echo '<br />'.$testid.'<br />';
代码是否有效
.
我的 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');
?>
我家.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>