Reputation: 141
I'm building a tool for a client where he can customize his own Facebook tabs. The install button works fine, and the tabs are added to his Facebook pages. But I was also planning on including a way to delete the tabs from the page in the tool I'm working on.
The documentation mentions the option to delete the tab through the API https://developers.facebook.com/docs/reference/api/page/#tabs
I tried that, but I only get a "Uncaught OAuthException: (#210) Subject must be a page" error. This is the code I used for that.
$facebook->api('/'.$page_id.'/tabs/app_'.$app_id.'', 'DELETE', array('access_token', $page_token));
I kept searching for another way to delete it and found this option as well, but this also return an error.
https://graph.facebook.com/pageid/tabs/tabid?method=delete&access_token=token returns -> (#100) Tab is not installed or not removable: And it's definitely installed!
Is it even supposed to work that you can delete installed apps through the API, or is this a case where the documentation writes about stuff that isn't working?
Upvotes: 0
Views: 1107
Reputation: 43816
I just tested it with my page, with the format /PAGE_ID/tabs/app_APPID
with method DELETE
and the Page's access_token
and it worked OK - it came back as 'true' and the tab was removed - note that i also got the 210 error the first time i tried, because I was accidentally using the user access_token for the page's admin instead of the page access token - so maybe double check that
Upvotes: 1