Reputation: 412
May I know how to unsubscribe Facebook Chatbot app from a page using url request?
I have created a Facebook Chatbot app and subscribed it on a page, now I want to unsubscribe it, I tried using DELETE url request method to "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=my_page_access_token" and return this:
{
"data": [
{
"link": "https://apps.facebook.com/mychatbotappid",
"name": "myChatbotApplicationName",
"id": "mychatbotappid"
}
]
}
When I test it again on the Messenger, the Chatbot is still there, it wasn't unsubscribe.
It there anything that I have done wrong?
Thanks!
Upvotes: 2
Views: 2212
Reputation: 96151
If you get data returned like this, it looks like you made a GET request, and not actually a DELETE one.
So using DELETE should “fix” this, and make it work as expected.
(In environments that don’t support DELETE requests, one can also make a normal GET request and specify the API method to use via an additional parameter: https://developers.facebook.com/docs/graph-api/using-graph-api/#largerequests)
Upvotes: 1