How do I change facebook messenger bot webhook?

…衆ロ難τιáo~ 提交于 2019-12-03 09:18:12
sabrina

You can't edit the link directy from the "Messenger" product. On the left menu, after selecting your application, you have to click "+ add product" and add also webhooks. From webhooks then you can edit also messenger's webhook.

To edit the webhook, click on Edit Subscription button on the page. Make sure that the dropdown at the top has the option Page selected.

You can change webhook under "webhooks" in menu (picture).

Besides setting from UI, you can also use subscriptions API to achieve this:

Docs: https://developers.facebook.com/docs/graph-api/reference/app/subscriptions

For example:

POST /v2.12/{app-id}/subscriptions HTTP/1.1
Host: graph.facebook.com

object=page&callback_url=http%3A%2F%2Fexample.com%2Fcallback%2F&fields=about%2C+picture&include_values=true&verify_token=thisisaverifystring

callback_url is what you want to change. Make sure you have correct field and verify_token setting too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!