由于某种原因,我的代码不起作用,我不确定为什么。这种格式适用于其他表,但是当我尝试从 event_member 表中检索事件 ID 时,它没有返回任何内容。有什么我做错了吗。我知道我参加了几个活动,所以它必须返回它们。
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;
}