如何解决“参数subscribed_fields是必需的"?将Facebook页面订阅到应用程序时出错? [英] How to solve "The parameter subscribed_fields is required" error while subscribing a facebook page to app?
问题描述
我正在创建一个应用程序,该应用程序将从我管理的Facebook页面中获取潜在客户,然后将其更新到Google表格中.
I am creating an app that will pull leads from facebook pages that I manage and update them into Google Sheets subsequently.
我已经设置了Webhook,并生成具有以下权限的长寿命页面访问令牌
I have setup the webhook, generated long lived page access token with following permissions
- manage_pages
- pages_show_list
- leads_retrieval
- ads_management
- ads_read
当我尝试使用POST请求{page_id}/subscribed_apps
将页面订阅到我的应用程序时,出现以下错误
When I try to subscribe the page to my app using POST request {page_id}/subscribed_apps
I get the below error
{
"error": {
"message": "(#100) The parameter subscribed_fields is required.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "Fv7RbO8tYqo"
}
}
研究表明,facebook在v3.2 api中添加了一个名为subscribed_fields的新参数,但是我不确定如何将值传递给该参数,或者我缺少什么?
Researching revealed that facebook has added a new parameter called subscribed_fields in v3.2 api, but I am not sure how values must be passed to that parameter or is there something I am missing?
推荐答案
在新的Graph API v3.2中,您必须传递参数subscribed_fields
以及post
请求me/subscribed_apps
(具有页面访问权限)令牌作为访问令牌).您需要传递一个可用的可预订字段数组,这些字段是:
In the new Graph API v3.2, you must pass a parameter subscribed_fields
, along with the post
request me/subscribed_apps
(with the page access token as the access token). You need to pass an array of available subscribable fields that are:
[
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,
]
例如:subscribed_fields: ['messages', 'message_deliveries']
这篇关于如何解决“参数subscribed_fields是必需的"?将Facebook页面订阅到应用程序时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!