iosiphonefacebookpaginationfacebook-fql

FQL for getting facebook user ids does not return "paging" key in response


Hi i want to get list of my fabebook friend ids with paging of 100 users. The problem is that if i set hte FQL to

        NSString *fqlString = @"SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 300";

It returns me as expected the only first 300 users in the table with out any reference to next page.

Result: {
data =     (
            {
        uid = 1519xxx;
    },
            {
        uid = 9806xxx;
    }

....
);

}

if i request friends with [FBRequest requestForMyFriends] it returns me all of my friends and additionaly a paging key with the url object for next page.

The question is how can i tell with FQL to give me lists of 100 users with paging to next 100 users.


Solution

  • The Graph API returns paging links; FQL does not. So you’d have to do that yourself, by making another query including an OFFSET parameter.