IG Media

Represents and Instagram photo, video, story, or album.

This node allows you to:

You cannot use this node to get IG Media objects. To get all media objects on an IG User, use the GET /{ig-user-id}/media endpoint instead.

Limitations

  • IGTV objects are not supported.

Creating

This operation is not supported. To create an IG Comment, use the POST /{ig-media-id}/comments endpoint instead.

Reading

Getting Metadata

GET /{ig-media-id}?fields={fields}

Gets an IG Media object's metadata.

Query String Parameters

Query string parameters are optional unless indicated as required.

  • {fields} — A comma-separated list of fields you want returned. See Returnable Fields.

Limitations

  • Fields that return aggregated values will not include ads-driven data. For example, comments_count will count comments on a photo, but not comments on ads that contain that photo.
  • Captions that @mention an IG User will not include the (@) symbol unless the request is made by the IG User that owns the IG Media object upon which the caption was made.
  • Some fields cannot be used on photos within albums (children).

Returnable Fields

  • caption* (excludes album children)
  • children* (carousel albums only)
  • comments (excludes album children, replies to comments, and the caption)
  • comments_count* (excludes album children, includes replies, includes the caption)
  • id*
  • ig_id
  • is_comment_enabled (excludes album children)
  • like_count* (excludes album children, includes replies)
  • media_type*
  • media_url*
  • owner (only returned if the IG User making the query also owns the IG Media object, otherwise the username field will be included)
  • permalink*
  • shortcode
  • thumbnail_url (only available on video IG Media objects)
  • timestamp*
  • username*

Fields marked with an asterisk (*) are public fields, which means they can be returned by an edge using field expansion.

Permissions

A Facebook User access token from a User who created the IG Media object, with the following permissions:

  • instagram_basic
  • manage_pages or pages_show_list

If the token is from a User whose Page role was granted via the Business Manager, one of the following permissions is also required:

  • ads_management
  • manage_pages
  • business_management

Sample Request

GET graph.facebook.com
  /17895695668004550?fields=id,media_type,media_url,owner,timestamp

Sample Response

{
  "id": "17895695668004550",
  "media_type": "IMAGE",
  "media_url": "https://fb-s-b-a.akamaihd.net/h-ak-fbx/t51.2885-9/21227247_1640962412602631_3222510491855224832_n.jpg?_nc_log=1",
  "owner": {
    "id": "17841405822304914"
  },
  "timestamp": "2017-08-31T18:10:00+0000"
}

Updating

Enabling/Disabling Comments

POST /{ig-media-id}?comment_enabled={comment_enabled}

Enables or disables comments on a media object.

Query String Parameters

Query string parameters are optional unless indicated as required.

  • {comment_enabled} (required) — Set to true to enable comments or false to disable comments.

Permissions

An access token from a User who created the media object, with the following permissions:

  • instagram_basic
  • instagram_manage_comments
  • manage_pages or pages_show_list

If the token is from a User whose Page role was granted via the Business Manager, one of the following permissions is also required:

  • ads_management
  • manage_pages
  • business_management

Sample Request

POST graph.facebook.com
  /17895695668004550?comment_enabled=false

Sample Response

{
  "success": true
}

Deleting

This operation is not supported.