Question

We've recently noticed responses changing a call to calls like:

/me?fields=adaccounts.fields(age,capabilities,currency)

Previously, we would get a response with the requested fields filled in, but now they are coming back with a response similar to:

{
  "id": "XXXXXXXXXX", 
  "adaccounts": {
    "data": [
      {
        "account_id": "XXXXXXXXXXXX", 
        "id": "XXXXXXXXXXX"
      }, 
      {
        "account_id": "XXXXXXXXXXX", 
        "id": "XXXXXXXXXXXXX"
      }
    ], 
    "paging": {
      "cursors": {
        "after": "NjAwMjIwMTIyNzM4OA==", 
        "before": "NjAwMjk2ODQ2OTc1OQ=="
      }
    }
  }
}

Has something changes there? We've been making calls via the api directly and on the Graph API Explorer tool.

Thanks for any help!

UPDATE:

Getting the details for adaccounts fields now requires hitting another endpoint:

/me/adaccounts?fields=age,capabilities,currency
Was it helpful?

Solution

There's no need for multiple calls, you can simply do:

/me/adaccounts?fields=age,capabilities,currency

OTHER TIPS

On October 2nd Facebook made changes to the ads API that requires you to specify what fields you want returned from all the end points. This includes ad account, campaign, group and creative. You must now issue the query with fields=fieldname,fieldname,fieldname with all the fields you want returned when performing a get request. Officially these changes were forced on for applications Friday Oct 4th.

A link with details about the Oct 2nd breaking changes can be found here: http://developers.facebook.com/roadmap/

Hope that helps!

Thanks, Erick

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top