6

It seems the new dialog to tab app to a page -> https://developers.facebook.com/docs/reference/dialogs/add_to_page/ - calls the app url with a GET (redirect_uri?tabs_added[nnnnn]=1) (where nnnn - pageId of page the app is being added to)

I can't find the documentation around whether when the app is removed from the page, the same url will be called with a GET (redirect_uri?tabs_added[nnnnn]=0) ?

I am keen to process the uninstall of the app from the page, if possible. (I have tried to test this, but don't get a trigger to my redirect_uri upon an installed, unlike the one that is called upon an install..)

My question is - whether there is a way to get a delete page callback into the app (when a page uninstalls/deletes the app from the page) ? From the syntax on install GET call (?tabs_added[nnn]=1, it seems that this might have been designed with an intention to call a GET with ?tabs_removed[nnnn]=1 or tabs_added[nnnn]=0 when the app is deleted from the page ?

user1055761
  • 1,071
  • 1
  • 12
  • 28
  • If you're requesting to have Facebook document it, this forum isn't the place. I'd suggest you click the Report Documentation issue at the bottom of the url that you gave above to ask Facebook to include that part of the documentation. – DMCS Jan 09 '12 at 02:15
  • Sorry, my question is - whether there is a way to get a delete page callback into the app (when a page uninstalls/deletes the app from the page) ? From the syntax on install GET call (?tabs_added[nnn]=1, it seems that this might have been designed with an intention to call a GET with ?tabs_removed[nnnn]=1 or tabs_added[nnnn]=0 when the app is deleted from the page ? Thanks! – user1055761 Jan 12 '12 at 02:24

2 Answers2

2

Empirically, the answer to your question is No. Nothing on my server gets called by Facebook when the Page Tab is removed.

julien_c
  • 4,942
  • 5
  • 39
  • 54
1

Go to the advanced tab on the facebook app settings, and put a URL of your choice into the 'Deauthorize Callback URL' field. You will receive a callback on that and you need to parse the signed request.

Example in php:

$helper = $fb->getPageTabHelper();
$signedRequest = $helper->getSignedRequest();

if ($signedRequest) {
    $payload = $signedRequest->getPayload();
    //trace(print_r($payload, true));
    $pageId = $payload['profile_id'];
    //You can now update your records using $pageId
}
  • Yes, I have been using this method for some time now. Sorry should have updated the question. (Hopefully helps anybody else with similar query) – user1055761 Aug 29 '15 at 20:54