3

I am hoping someone can shed some light on this for me, as it has been driving me mad for some time now.

I have an application that is trying to read a users feed. The user has given sufficient permission for this, as documented below. I do get a result set back, but the result set is not complete.

If I run the same Graph API request using the Graph Api Explorer app, with the exact same permissions, as documented below, I get the full and correct result set back.

I have detailed both result sets below. I have set a limit on the results in this example to 2 (as the first 2 results in the query are the ones that highlight this issue). However, you can replicate this by removing the limit or setting any other limit.

As you can see, with the same permission set, and a valid access token for both requests, the response is completely different. The only difference that I know of between the type data that is missing from my app versus the data that is actually returned is that

1) The first missing result is a post to a friend page, by the user 2) The second missing result is data shared by the user via an app 3) All results returned by My App are posts made by me on my own 'Timeline/Wall' (whatever it is referred to now

Would there be any reason why my app (even though the permissions are the same as the Graph Api Explorer app) would not return those 2 types of posts?

All help and suggestion greatly appreciated.

Graph API Query

me/feed?fields=id,comments,type,likes,story_tags,with_tags,to

Result Set for My App

{
  "data": [
    {
      "id": "XXXXXXXX_101523YYYY25626", 
      "comments": {
        "count": 0
      }, 
      "type": "link", 
      "created_time": "2012-12-03T16:04:33+0000"
    }, 
    {
      "id": "XXXXXXXXX_570424YYYY73312", 
      "comments": {
        "count": 0
      }, 
      "type": "link", 
      "created_time": "2012-12-03T14:45:38+0000"
    }
  ], 
  "paging": {
    "previous": "....", 
    "next": "...."
  }
}

Result Set from Graph Api Explorer App

{
  "data": [
    {
      "id": "XXXXXXXX_10152YYYYY50626", 
      "comments": {
        "count": 0
      }, 
      "type": "status", 
      "story_tags": {
        "64": [
          {
            "id": "ZZZZZZZZZZ", 
            "name": "Name", 
            "offset": 64, 
            "length": 12, 
            "type": "user"
          }
        ]
      }, 
      "created_time": "2012-12-03T16:46:41+0000"
    }, 
    {
      "id": "XXXXXXX_1015230YYYYYYY626", 
      "comments": {
        "count": 0
      }, 
      "type": "photo", 
      "likes": {
        "data": [
          {
            "name": "Name", 
            "id": "ZZZZZZZZ"
          }, 
          {
            "name": "Name, 
            "id": "ZZZZZZZZ"
          }
        ], 
        "count": 2
      }, 
      "story_tags": {
        "0": [
          {
            "id": "ZZZZZZZZZ", 
            "name": "Name", 
            "offset": 0, 
            "length": 13, 
            "type": "user"
          }
        ]
      }, 
      "created_time": "2012-12-03T16:40:24+0000"
    }
  ], 
  "paging": {
    "previous": "......", 
    "next": "......"
  }
}

Permissions for My App

{
  "data": [
    {
      "installed": 1, 
      "read_stream": 1, 
      "email": 1, 
      "read_insights": 1, 
      "user_birthday": 1, 
      "user_relationships": 1, 
      "user_photos": 1, 
      "user_videos": 1, 
      "user_photo_video_tags": 1, 
      "user_about_me": 1, 
      "user_status": 1, 
      "friends_about_me": 1
    }
  ], 
  "paging": {
    "next": "..."
  }
}

Permissions for Graph Api Explorer

{
  "data": [
    {
      "installed": 1, 
      "read_stream": 1, 
      "email": 1, 
      "read_insights": 1, 
      "user_birthday": 1, 
      "user_relationships": 1, 
      "user_photos": 1, 
      "user_videos": 1, 
      "user_photo_video_tags": 1, 
      "user_about_me": 1, 
      "user_status": 1, 
      "friends_about_me": 1
    }
  ], 
  "paging": {
    "next": "...."
  }
}

1 Answers1

-1

The feed results will almost always be different as new content gets pushed to the feed. Look at the times for each update you have:

  • Graph Explorer: 2012-12-03T16:40:24+0000
  • Your app: 2012-12-03T14:45:38+0000

Both stories that you get in the Graph Explorer are two hours after the story that you get in your app. The Graph Explorer itself is built on the API and doesn't make direct internal calls to get the results. To check this, you can use Firebug or the Google Chrome inspector and look at the AJAX calls being made.

There should be no difference between one and the other. The Explorer is just a great tool to test things out, but doesn't have any "advantages" in terms of the returned results.

For sets of data that change like this, a direct comparison between a call made through your app and the Graph Explorer isn't probably the best option, since the results will so often be different.

There might also be delays between the real feed on facebook.com and the version you get through the API. This can explain the temporary delay between your calls, since this outdated view doesn't have a "global state" (ie: the feed returns results for -4 hours for everyone): https://developers.facebook.com/docs/reference/api/

Hope this helps solve your problem.

Claudiu
  • 3,261
  • 1
  • 15
  • 27