用户使用PHP api 3.2.3在Facebook上参加活动[关闭]

I seem to do something wrong here. The api call doesn't seem to work, I don't get anything return aswell.

try {
    $fbID = $facebook->getUser();
} 
catch (FacebookApiException $e) {
    $loginUrl = $facebook->getLoginUrl(array('scope' => 'email,user_events,rsvp_event'));
    return "<script language='javascript' type='text/javascript'>top.location.href='".$loginUrl."';</script>";
}
if ($fbID != "0") {
    $permissions = $facebook->api('/me/permissions/rsvp_event', 'get');
    if ($permissions['data']['0']['status'] == 'granted') {
        $fbEID = $activiteit['facebookid'];
        try {
            //This is where is goes wrong... $result doesn't return anything, however I don't get any error aswell...
            //However I'm sure that the code reads this... A simple echo works well...
            $result = $facebook->api('/".$fbEID."/attending', 'POST');                          
        } catch (FacebookApiException $e) {
                print_r($e);
        }
    }
}

Try this:

$result = $facebook->api('/'.$fbEID.'/attending', 'POST');

You're using double quotes inside, when you should be using single quotes, as outside.