我在使用messenger API和頁面訪問令牌向在頁面上發表評論的用戶發送消息時遇到了問題。我做了以下操作:Facebook Messenger API:發送消息給評論者第
- 將頁面訂閱到測試應用程序,該應用程序具有監視頁面'feed'參數的webhook。
網絡掛接回調得到與此類似結構的結果,當一個人在網頁上的信息發表評論:通過發送POST請求
https://graph.facebook.com/v2.6/me/messages?access_token=PAGE_ACCESS_TOKEN
({ "entry": [{ "changes": [{ "field": "feed", "value": { "item": "comment", "sender_name": SENDER, "comment_id": COMMENT_ID, "sender_id": SENDER_ID, "post_id": POST_ID, "verb": "add", "parent_id": PARENT_ID, "created_time": 1492159609, "message": "hello" } }], "id": PAGE_ID, "time": 1492159609 }], "object": "page" }
我再打電話與SENDER_ID使者API之上作爲與PARAMS記錄here):
recipient: { id: '10158402684940316' }, message: { text: 'what up' }
,但我得到的錯誤:(#100) No matching user found.
任何想法我在做什麼錯在這裏?
網絡掛接的換頁會給你的應用程序範圍的用戶ID,而Messenger平臺使用頁面範圍的用戶ID。 – CBroe