Fetching Campaign by ID throwing error: "error":{"message":"(#100) Tried accessing nonexisting field (benchmark_report_count) on node type (Campaign)","type":"OAuthException","code":100}}
gotham3 opened this issue · comments
Which SDK version are you using?
v15.0
What's the issue?
Earlier when fetching campaign by ID returned the campaign object.
Campaign campaign = Campaign.fetchById(facebookCampaignId, adAccount.getContext());
Steps/Sample code to reproduce the issue
Campaign campaign = Campaign.fetchById(facebookCampaignId, adAccount.getContext());
Observed Results:
- What happened? This could be a description, log output, etc.
Error message:
"error":{"message":"(#100) Tried accessing nonexisting field (benchmark_report_count) on node type (Campaign)","type":"OAuthException","code":100,"fbtrace_id":"ALioBv-AQDqKWbowOdDXPFI"}}
Expected Results:
- What did you expect to happen?
Expected campaign object in return
The error message has indicated benchmark_report_count doesn't exist. So you need to remove it from list of fields.
But we are not requesting for any specific field. We're just using this function:
Campaign.fetchById(facebookCampaignId, adAccount.getContext())
in the SDK there is a field called benchmark_report_count. And this same function is working in v14.0
Could you check if you are using the latest version (15.0.2) of the SDK? The field benchmark_report_count
has been removed from the class. link
If you still encounter this issue using the latest version of SDK, please file a bug here https://developers.intern.facebook.com/support/bugs/.