Search code examples
facebookfacebook-graph-apiinstagraminstagram-apiinstagram-graph-api

Can't fetch all fields from Instagram graph API media node


Some fields work as they should, fields like media_type, id and permalink.

But if I try to fetch timestamp, owner or username I get an error message:

  "error": {
    "message": "(#100) Please read documentation for supported fields.",
    "type": "OAuthException",
    "code": 100,
    "fbtrace_id": "HYYvmdnqQIh"
  }

Nothing in the documentation says that there should be any restrictions for these field.

My API call looks like this:

https://graph.facebook.com/{HASHTAG ID}/recent_media?user_id={USER ID}&fields=id,media_type,media_url,caption,permalink,timestamp,username,owner&access_token={ACCESS TOKEN}

Solution

  • You cannot get timestamp, username and others for hashtag media, you can only get more details for your media, for other public content you can only get very basic info about media.

    These are the data you can get for hashtag media:

    • caption
    • comments_count
    • id
    • like_count
    • media_type
    • media_url
    • permalink

    Here is link to hashtag documentation