Deleting page tabs
-
19-06-2021 - |
Вопрос
When I try delete a page tab, facebook throws me an error.
$facebook->api('/PAGE_ID/tabs/TAB_ID', 'post', array(
'method' => 'delete',
'access_token' => PAGE_TOKEN
));
Fatal error: Uncaught GraphMethodException: Unsupported post request.
$facebook->api('/PAGE_ID/tabs/TAB_ID', 'get', array(
'method' => 'delete',
'access_token' => PAGE_TOKEN
));
Fatal error: Uncaught GraphMethodException: Unsupported get request.
$facebook->api('/PAGE_ID/tabs/TAB_ID', 'delete', array(
'access_token' => PAGE_TOKEN
));
Fatal error: Uncaught GraphMethodException: Unsupported delete request.
What am I doing wrong?
Решение
It should be a HTTP DELETE request.
Either change 'post' to 'delete' and remove the unnecessary 'method => delete' or change 'post' to 'get' and leave the 'method => delete' in place
Не связан с StackOverflow