我使用Facebook的廣告API來讀取從其他帳戶活動。我創建了應用程序,得到了app_id和app_secret。在圖形瀏覽器中,我使用其他人的訪問令牌和帳戶ID來獲得他的競選。但Facebook給我以下錯誤:Facebook廣告API - 讀取其他帳戶活動
{
"error": {
"message": "(#274) The ad account is not enabled for usage in Ads API. Please add it in developers.facebook.com/apps -> select your app -> settings -> advanced -> advertising accounts -> Ads API. Account 1817273581872129 not enabled for this application.",
"type": "OAuthException",
"code": 274,
"fbtrace_id": "GW38TMsIi1v"
}
}
我沒有按照錯誤指示,但仍然是同樣的問題。
這裏的網址。我正在使用圖形資源管理器:
act_12345566654/campaigns
然而,當我使用Facebook廣告API的Python: 我收到以下錯誤:
FacebookRequestError:
Message: Call was not successful
Method: GET
Path: https://graph.facebook.com/v2.8/act_1817273581872129/campaigns
Params: {'summary': 'true'}
Status: 400
Response:
{
"error": {
"message": "Invalid appsecret_proof provided in the API argument",
"code": 100,
"type": "GraphMethodException",
"fbtrace_id": "FRdlngO8f04"
}
}
這裏是代碼:
session = FacebookSession(self.app_id, self.app_secret, self.access_token)
ads_api = FacebookAdsApi(session)
adaccount = AdAccount(self.account_id, api=ads_api)
campaigns = adaccount.get_campaigns()
我在哪裏出錯了?請幫助我
對於第二個問題:http://stackoverflow.com/questions/18683421/why-do-i-get-invalid-appsecret-proof-provided-in-the-api-argument – CBroe