问题描述
我正在尝试使用PHP创建Facebook机器人,但是当我尝试打开时 https://graph.facebook.com/v3. 2/me/messages?access_token = MY-ACCESS-TOKEN
I'm trying to make Facebook bot with PHP, but when i try to openhttps://graph.facebook.com/v3.2/me/messages?access_token=MY-ACCESS-TOKEN
我收到此错误消息.
另外,当我打开我的代码时,我得到了这个错误.
Also when i open my code i got this error.
/storage/ssd3/943/6474943/public_html/index.php on line 11
推荐答案
您正在使用页面访问令牌并尝试获取/{your-page}/messages
,这似乎仅是POST请求的有效端点:"> https://developers.facebook.com/docs/graph-api/reference/page/.
You are using a page access token and trying to get /{your-page}/messages
, that seems to be a valid endpoint only for POST requests: https://developers.facebook.com/docs/graph-api/reference/page/.
您正在寻找的是/me/conversations
: https ://developers.facebook.com/docs/graph-api/reference/page/conversations/.
这篇关于拥有Php(#100)的Facebook机器人试图访问节点类型(Page)上不存在的字段(消息)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!