Для себя я не могу найти способ удалить, отменить или удалить события facebook, которые я создал и обновил, используя FB PHP SDK и API Graph.
Я перепробовал каждую перестановку, найденную в документации Facebook и переполнение стека ...
Вот некоторые подсказки, которые я нашел в своем квесте ..
https://developers.facebook.com/docs/reference/api/#deleting https://developers.facebook.com/docs/reference/api/event/ https://developers.facebook.com/docs/reference/rest/events.cancel/
Ошибка удаления комментария API SDK и графика Facebook
API Facebook - статус удаления
API Graph Facebook - удалить как
Вот что я пробовал до сих пор.
function delete_fb_event($event_data, $data)
{
//load the user for offline access and userid
$user = $this->load_user($data['aid']);
if(!empty($user[0]['fb_offline_access']))
{
//instantiate Facebook API
require 'facebook.php';
$facebook = new Facebook(array(
'appId' => 'BLAHBLAHBLAH',
'secret' => 'BLAHBLAHBLAHBLAHBLAHBLAH',
'cookie' => true,
));
$fb_event = array(
"access_token" => $user[0]['fb_offline_access'],
);
$result = $facebook->api('/'.$event_data['fb_event_id'], 'DELETE', $fb_event); //Uncaught GraphMethodException: Unsupported delete request
//$result = $facebook->api('/'.$user[0]['fb_id']."_".$event_data['fb_event_id'], 'POST', array('access_token' => $user[0]['fb_offline_access'], 'method' => 'delete')); Uncaught OAuthException: (#803) Some of the aliases you requested do not exist
//$result = $facebook->api('/'.$event_data['fb_event_id']."_".$user[0]['fb_id'], 'POST', array('access_token' => $user[0]['fb_offline_access'], 'method' => 'delete')); Uncaught OAuthException: (#803) Some of the aliases you requested do not exist
//$result = $facebook->api('/'.$event_data['fb_event_id'], 'POST', array('access_token' => $user[0]['fb_offline_access'], 'method' => 'delete')); Uncaught GraphMethodException: Unsupported post request
//$result = $facebook->api('/'.$user[0]['fb_id']."_".$event_data['fb_event_id'], 'POST', array( 'access_token' => $user[0]['fb_offline_access'], 'method' => 'delete' )); Uncaught OAuthException: (#803) Some of the aliases you requested do not exist
return $result;
}
else
{
echo "error3"; //no FB offline access
}
}