Facebook 向Messenger bot用户发送推送消息

Facebook 向Messenger bot用户发送推送消息,facebook,facebook-messenger,messenger,facebook-messenger-bot,Facebook,Facebook Messenger,Messenger,Facebook Messenger Bot,我希望能够随时向Messenger机器人的用户发送推送消息。由于以下原因,我获得了用户ID: event.sender.id 然后,我尝试发送这个职位要求根据。它返回“成功”,但我没有收到任何消息。bot正在开发中 curl -X POST -H "Content-Type: application/json" -d '{ "recipient": { "id": "1451521288246029" // this is my sender id }, "message"

我希望能够随时向Messenger机器人的用户发送推送消息。由于以下原因,我获得了用户ID:

event.sender.id
然后,我尝试发送这个职位要求根据。它返回“成功”,但我没有收到任何消息。bot正在开发中

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient": {
    "id": "1451521288246029" // this is my sender id
  },
  "message": {
    "text": "hello, world!"
  }
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=<TOKEN>"
curl-xpost-H“内容类型:application/json”-d”{
“收件人”:{
“id”:“1451521288246029”//这是我的发件人id
},
“信息”:{
“文本”:“你好,世界!”
}
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token="

知道如何发送推送消息吗?

问题已解决,我使用的是“messenger\u profile”端点而不是“messages”端点。

event.sender.id来自何处?是否可能用户不是分配给bot的页面的管理员?虽然机器人正在开发中,但它只能与该页面的管理员通信。不幸的是,我是该页面的管理员。我将尝试发布该应用程序,看看它是否有效