0
出於某種原因,我的代碼不起作用,我不知道爲什麼。這種格式適用於其他表格,但是當我嘗試從event_member表中檢索事件ID時,它不會返回任何內容。有什麼我做錯了嗎?我知道我正在參加幾個活動,所以它必須返回它們。爲什麼我無法從event_member表中檢索數據? Facebook
require_once 'facebook.php'; //Facebook class
$Facebook = new Facebook($config); //Initialize Facebook
$fb = $Facebook->getUser(); //Get the user
//Authorize the user
if ($fb)
{
try
{
$user = $Facebook->api('/me');
}
catch (FacebookApiException $e)
{
echo "There was an unexpected error. Please contact us.";
$fb = null;
}
}
try
{
$fql = "SELECT eid FROM event_member WHERE uid = me()";
$param = array('method' => 'fql.query', 'query' => $fql, 'callback' => '');
$result = $Facebook->api($param);
foreach ($result as $row)
{
echo $row["eid"] . "<br/>";
}
}
catch (FacebookApiException $e)
{
echo $e;
}