Facebook Messenger Web仅使“我的页面”传递

时间:2019-02-19 18:22:25

标签: facebook facebook-graph-api

因此,我创建了一个具有授予pages_messaging权限的facebook“机器人”,我可以成功运行以下订阅代码:

curl -i -X POST \
  -d "access_token=PageTokenOfAnotherPage" \
  "https://graph.facebook.com/v3.2/PageIDOfOtherPage/subscribed_apps?subscribed_fields=feed,mention,name,picture,category,description,conversations,branded_camera,feature_access_list,standby,messages,messaging_account_linking,messaging_checkout_updates,message_echoes,message_deliveries,messaging_game_plays,messaging_optins,messaging_optouts,messaging_payments,messaging_postbacks,messaging_pre_checkouts,message_reads,messaging_referrals,messaging_handovers,messaging_policy_enforcement,messaging_page_feedback,messaging_appointments,founded,company_overview,mission,products,general_info,leadgen,leadgen_fat,location,hours,parking,public_transit,page_about_story,phone,email,website,ratings,attire,payment_options,culinary_team,general_manager,price_range,awards,hometown,current_location,bio,affiliation,birthday,personal_info,personal_interests,publisher_subscriptions,members,checkins,page_upcoming_change,page_change_proposal,merchant_review,product_review,videos,live_videos,registration"

然后我在这里用{“ success”:true}返回了200 OK,并且当发生一条消息以外的其他内容时,像发类似消息,我将其返回到我的Web钩子上,但没有消息,这是什么我做错了吗?谢谢!

1 个答案:

答案 0 :(得分:0)

因此,我的答案是,我忘记在oauth范围内为用户令牌添加 pages_messaging 。当您获得Facebook批准的pages_messaging时,这非常重要,请务必将其重新添加到范围中。

希望这对其他人有帮助!