I am wondering if this is a Facebook bug or something that I am doing wrong. Anyways, I am developing a server application that talks to my own simple Facebook app via Graph API calls. For development purposes, the only users of the Facebook app are a few Test Users that I have defined. In this scenario, I have one test user "Lisa Mills" and I want to return a list of her friends. Her only friend is "John Smith". I use the Graph API HTTPS call for retreiving her list of friends, like so (links probably won't work anymore, but they are posted here for illustrative purposes):
https://graph.facebook.com/100004330990794/friends?access_token=AAAGGG3niQkQBAPne8jGOcfZAUZCiqbgDMAPV0QlA5GMGorFdEZCOBAX3daZAOkcWmenyfFwYzuBCxrE2gEOXaZAa7tJptZBE826vvHdw7JtCZB0If9mJ041
The resulting data:
{
"data": [
{
"name": "John Smith",
"id": "100004375356845"
}
],
"paging": {
"next": "https://graph.facebook.com/100004330990794/friends?access_token=AAAGGG3niQkQBAPne8jGOcfZAUZCiqbgDMAPV0QlA5GMGorFdEZCOBAX3daZAOkcWmenyfFwYzuBCxrE2gEOXaZAa7tJptZBE826vvHdw7JtCZB0If9mJ041&limit=5000&offset=5000&__after_id=100004375356845"
}
}
What is puzzling is why the JSON response contains a "next page" value because Lisa is not going to have any other friends to return. Anyways, if I go to the URI specified in the JSON, I receive this response:
{
"data": [
],
"paging": {
"previous": "https://graph.facebook.com/100004330990794/friends?limit=5000&offset=0&access_token=AAAGGG3niQkQBAPne8jGOcfZAUZCiqbgDMAPV0QlA5GMGorFdEZCOBAX3daZAOkcWmenyfFwYzuBCxrE2gEOXaZAa7tJptZBE826vvHdw7JtCZB0If9mJ041"
}
}
Of course...no data is returned. I would naturally presume that this "next page" should only have additional data if Lisa had over 5000 friends. Is this a bug in Facebook's Graph API, or is this a normal situation that my server application needs to handle without error?