ファンページではなく、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] => ...
)
しかし、アドレスバーのURLを変更してhttps://apps.facebook.com/myappname/?app_data=hello
Enterキーを押すと、配列に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');
?>
私の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>