IG Media

Represents and Instagram Photo, Video, Story, or Album. IGTV and Reels are not supported.

This Node allows you to:

To get all media objects on an IG User use the IG User Media Edge.

Creating

This operation is not supported. To create an IG Comment, use the IG Media Comments Edge instead.

Reading

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

Gets Fields and Edges on an IG Media.

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 will not include the (@) symbol unless the app user is also able to perform Admin-equivalent Tasks on the app.
  • Some Fields cannot be used on Photos within Albums (children).
  • The media_url field will be omitted from responses if the IG Media contains copyrighted material or has been flagged for a copyright violation.
  • IGTV and Reels are not supported.

Requirements

TypeDescription

Access Tokens

User

Permissions

instagram_basic
pages_read_engagement
pages_show_list


If the app user was granted a role on the Page via the Business Manager, you will also need one of:


ads_management
business_management

Request Syntax

GET https://graph.facebook.com/v8.0/{ig-media-id}
  ?fields={fields}
  &access_token={access-token}

Query String Parameters

ParameterValue

{access-token}
Required
String

The app user's User Access Token.

{fields}
Comma-separated list

A comma-separated list of Fields you want returned.

Fields

  • caption* (excludes album children). Will not include the (@) symbol unless the app user is also able to perform Admin-equivalent Tasks of the app.
  • comments_count* (excludes album children and the caption, includes replies)
  • id*
  • ig_id
  • is_comment_enabled (excludes album children)
  • like_count* (excludes album children and likes on promoted posts created from the media object, includes replies)
  • media_type*
  • media_url* (will be omitted from responses if the IG Media contains copyrighted material, or has been flagged for a copyright violation.)
  • 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* — ISO 8601 formatted creation date in UTC (default is UTC ±00:00)
  • username*

Fields marked with an asterisk (*) are public Fields, which means they can be returned through Field Expansion.

Edges

Edges marked with an asterisk (*) are public Edges, which means they can be returned through Field Expansion.

Sample Request

curl -X GET \
  'https://graph.facebook.com/v8.0/17895695668004550?fields=id,media_type,media_url,owner,timestamp&access_token=IGQVJ...'

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
  • pages_read_engagement 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
  • pages_read_engagement
  • business_management

Sample Request

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

Sample Response

{
  "success": true
}

Deleting

This operation is not supported.