Facebook dialog to add facebook tab application - returns - tabs_added [pageId] = 1

It seems that a new dialog to go to the page -> https://developers.facebook.com/docs/reference/dialogs/add_to_page/ - calls the application URL using GET (redirect_uri? Tabs_added [nnnnn] = 1) (where nnnn - pageId of the page to which the application is added)

I can’t find the documentation on whether when the application is removed from the page, the same url will be called using GET (redirect_uri? Tabs_added [nnnnn] = 0)?

I try to handle the removal of the application from the page, if possible. (I tried to check this, but I do not get a trigger for my redirect_uri on the installed, unlike the one caused by the installation ..)

My question is: is there a way to get the delete page callback to the application (when the page removes or removes the application from the page)? From the syntax for setting a GET call (? Tabs_added [nnn] = 1, it looks like it could have been designed with the intention of calling a GET with? Tabs_removed [nnnn] = 1 or tabs_added [nnnn] = 0 when the application is removed from the page?

+6
source share
2 answers

Go to the "Advanced" tab in the settings of the facebook application and put the URL of your choice in the "Allow callback" field. You will receive a callback and you need to parse the signed request.

An 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 } 
+1
source

Empirically, the answer to your question is No. Nothing on my server is caused by Facebook when the page was deleted.

+2
source

Source: https://habr.com/ru/post/905470/


All Articles