Instagram User object
GET v24.0/...?fields={fieldname_of_type_IGUser} HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'...?fields={fieldname_of_type_IGUser}',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result *//* make the API call */
FB.api(
"...?fields={fieldname_of_type_IGUser}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"...?fields={fieldname_of_type_IGUser}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"...?fields={fieldname_of_type_IGUser}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];| Field | Description |
|---|---|
idnumeric string | The id of the object |
biographystring | Biography of the user |
business_discovery | Loads business discovery information |
followers_countinteger | Active follower count of the user |
follows_countinteger | Active follows count of the user |
bool | has_profile_pic |
ig_idinteger | Ig Id of the user |
bool | is_published |
legacy_instagram_user_idnumeric string | Legacy Instagram user id still used in some endpoints |
media_countinteger | Filtered media count of the user |
mentioned_commentShadowIGComment | Loads the comment if the user is mentioned in it |
mentioned_mediaShadowIGMedia | Loads the media if the user is mentioned in the caption |
namestring | Name of the user |
profile_picture_urlstring | The cdn url to query the raw profile picture of the user |
shopping_review_statusenum | Status of the Shopping Merchant Review process for this account |
usernamestring | Username handle of the user |
websitestring | Url in the profile |
| Edge | Description |
|---|---|
Edge<Business> | agencies |
Edge<IGBCAdsPermission> | branded_content_ad_permissions |
Edge<BrandedContentShadowIGMediaID> | branded_content_advertisable_medias |
Edge<ContentPublishingLimitResponse> | content_publishing_limit |
Edge<InstagramInsightsResult> | Insights data of this IG user |
Edge<ShadowIGMedia> | live_media |
Edge<ShadowIGMedia> | Timeline media of this IG user |
Edge<UserPageOneTimeOptInTokenSettings> | notification_message_tokens |
Edge<IGShoppingProductAppeal> | product_appeal |
Edge<ShadowIGHashtag> | Recently searched hashtags through the Graph API by an Instagram User |
Edge<ShadowIGMedia> | Stories of this IG user |
Edge<ShadowIGMedia> | Media that this user is tagged in |
Edge<IGUpcomingEvent> | upcoming_events |
| Error | Description |
|---|---|
| 110 | Invalid user id |
| 100 | Invalid parameter |
| 200 | Permissions error |
| 190 | Invalid OAuth 2.0 Access Token |
| 80002 | There have been too many calls to this Instagram account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 2500 | Error parsing graph query |
| 3006 | Not enough users |
| 102 | Session key invalid or no longer valid |
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |
media edge from the following paths: | Parameter | Description |
|---|---|
alt_textstring | Accessibility of a media |
captionstring | Default value: ""Caption for the media to be created |
collaboratorsarray<string> | Field that adds collaborators to a media |
image_urlstring | A URL where the image to be uploaded |
is_carousel_itemboolean | is_carousel_item |
location_idnumeric string | Location id tagged in media |
media_typestring | Default value: "IMAGE"media_type |
product_tagsarray<JSON object> | IG Shopping products tagged in media |
share_to_feedboolean | share_to_feed |
thumb_offsetstring | A numberic string for thumbnail offset in video stream to generate thumbmail |
user_tagsarray<JSON object> | IG users tagged in media |
id in the return type.id: numeric string, uri: string, | Error | Description |
|---|---|
| 100 | Invalid parameter |
| 9004 | Only photo or video can be accepted as media type. |
| 36003 | The aspect ratio is not supported. |
| 210 | User not visible |
| 110 | Invalid user id |
| 190 | Invalid OAuth 2.0 Access Token |
| 36001 | The image format is not supported. |
| 36004 | The caption was too long. |
| 105 | The number of parameters exceeded the maximum for this operation |
| 200 | Permissions error |