0

When requesting all adgroups or creatives for an account:

GET / adgroups?ids=act_accountid&access_token=...

the return includes a paging field, such as:

{
    *id*: {
        "data": [
            {
                ...
            },
            ...
        ],
    "count": 1500,
    "limit": 500,
    "offset": 0,
    "include_deleted": null
    "paging": {
             "next": ...
        },
    }
}

However, when requesting all adgroups for a campaign:

GET / adgroups?ids=campaign_id&limit=10&access_token=...

the return does not include a paging field:

{
    *id*: {
        "data": [
            {
                ...
            },
            ...
        ],
    "count": 15,
    "limit": 10,
    "offset": 0,
    "include_deleted": null
    }
}

Is this a bug, the intended operation, a future feature, etc? While I don't have real examples of needing the paging field (currently none of our campaigns would exceed the default limit), I don't want to design code that relies on a potentially non-existent paging field.

Thanks in advance.

John Pickard
  • 308
  • 1
  • 8

1 Answers1

1

Are you looking at the data object of the returned result set? If so, the paging object is not a child of data, rather it is a sibling. Try running your query thru the graph API Explorer and see if at the bottom of the results you can see the paging object.

DMCS
  • 31,720
  • 14
  • 71
  • 104
  • I see the same result in the graph API Explorer. No paging object when requesting adgroups for a campaign. Yes, I am looking at siblings of the data object. – John Pickard Jan 13 '12 at 21:07
  • Ok, then it's not possible. Maybe you can open a bug that can be added to Facebook's wishlist. https://developers.facebook.com/bugs/ – DMCS Jan 13 '12 at 21:18
  • 1
    Will do, of course I first have to get registered as a Facebook developer which I couldn't figure out how to do. Nearest I could find would be to create a new app, which I don't want to do. I emailed our Facebook contact and we see if they can help. – John Pickard Jan 17 '12 at 16:16