Posts from Instagram not showing up on Facebook Open Graph API

Goni picture Goni · Jul 26, 2012 · Viewed 7k times · Source

I have an issue with Facebook OpenGraph API. Whenever I request data using either '/home' or '/feed', none of the posts from Instagram showed up.

I've been googling around and apparently some people raised the same issue with no solution yet. And I read some that the issue not only affecting posts from Instagram, but also other third-party app/device/platform.

Even the ticket posted on Facebook's dev page seems somewhat dead (no continuation). Link: https://developers.facebook.com/bugs/110563582419837/

If any of you guys also stumbled on this issue and has some ideas/pointers/links, please do share and let's discuss it.

Much appreciated. Cheers!

Answer

Igy picture Igy · Jan 7, 2013

There are two bug reports in Facebook's bug tracker about this: https://developers.facebook.com/bugs/110563582419837 and https://developers.facebook.com/bugs/202119973248747

The core reason is that the photos are attached to Open Graph actions as User Generated Photos and not via the regular Photo upload API.

As such, the regular photos permissions don't grant access to them and you need the user to specifically allow you the access their Open Graph activity for the app that posted the actions. The bug reports above are accepted on the basis that this appears to be an oversight in the case of actions with user generated photos, but it could also be by design in which case what i've outlined below as a workaround would be the only supported way to do this:

If you specifically need to request Instagram (or another Open Graph photos app) photos for a user, you can ask for Permission to access the actions posted by that app.

For Instagram photos you can do this by requesting the user_actions:instapp permission and once you've done that the Instagram Photos album will no longer appear to be empty, and the Instagram activity will appear in the feed connection.

To find out the namespace for an arbitrary app, access https://graph.facebook.com/<APP ID> and look for the namespace field,

e.g. for instagram, a call to https://graph.facebook.com/124024574287414/?fields=id,namespace returns:

{
  "id": "124024574287414", 
  "namespace": "instapp"
}

A sample photo from my own /feed connection, retrieved with the read_stream, user_photos, user_actions:instapp permissions, is:

{
  "data": [
    {
      "id": "[SNIPPED]", 
      "from": {
        "name": "[SNIPPED]", 
        "id": "[SNIPPED]"
      }, 
      "picture": "[SNIPPED]", 
      "link": "https://www.facebook.com/photo.php?fbid=[SNIPPED]", 
      "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yb/x/StEh3RhPvjk.gif", 
      "privacy": {
        "value": ""
      }, 
      "type": "photo", 
      "object_id": "[SNIPPED]", 
      "application": {
        "name": "Instagram", 
        "namespace": "instapp", 
        "id": "124024574287414"
      }, 
      "created_time": "2013-01-07T17:33:04+0000", 
      "updated_time": "2013-01-07T17:33:04+0000", 
      "comments": {
        "count": 0
      }
    }, 

I can also access the /photos connection of my 'Instagram Photos' album with the same permissions, and can access all Instagram 'take' actions (i.e the photos) at /me/instapp:take