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);
}
}
}