Graph API-Version

IGUser Media

Wird gelesen

ShadowIGUserMedia

Beispiel

Graph API Explorer
GET /v21.0/{ig-user-id}/media 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(
    '/{ig-user-id}/media',
    '{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(
    "/{ig-user-id}/media",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{ig-user-id}/media",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{ig-user-id}/media"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Weitere Informationen zur Verwendung der Graph API findest du in unserem Graph API-Leitfaden.

Parameter

Dieser Endpunkt hat keine Parameter.

Felder

Beim Lesen dieses Edge wird ein Ergebnis im JSON-Format ausgegeben:

{ "data": [], "paging": {} }

data

Eine Liste von ShadowIGMedia-Nodes.

paging

Weitere Informationen zur Paginierung findest du im Graph API-Leitfaden.

Error Codes

FehlerBeschreibung
190Invalid OAuth 2.0 Access Token
100Invalid parameter
200Permissions error
80002There 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.
9005Video content was not found.
2500Error parsing graph query

Wird erstellt

You can make a POST request to media edge from the following paths:
When posting to this edge, an IGUser will be created.

Parameter

ParameterBeschreibung
caption
string
Standardwert: ""

Caption for the media to be created

collaborators
array<string>

Field that adds collaborators to a media

image_url
string

A URL where the image to be uploaded

is_carousel_item
boolean

is_carousel_item

location_id
numeric string

Location id tagged in media

media_type
string
Standardwert: "IMAGE"

media_type

product_tags
array<JSON object>

IG Shopping products tagged in media

share_to_feed
boolean

share_to_feed

thumb_offset
string

A numberic string for thumbnail offset in video stream to generate thumbmail

user_tags
array<JSON object>

IG users tagged in media

username
string

username

erforderlich
x
float

x

y
float

y

Rückgabetyp

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
uri: string,
}

Error Codes

FehlerBeschreibung
100Invalid parameter
9004Only photo or video can be accepted as media type.
200Permissions error
36003The aspect ratio is not supported.
110Invalid user id
36001The image format is not supported.
210User not visible
190Invalid OAuth 2.0 Access Token
36004The caption was too long.
80002There 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.

Wird aktualisiert

Diese Handlung kann auf diesem Endpunkt nicht durchgeführt werden.

Wird gelöscht

Diese Handlung kann auf diesem Endpunkt nicht durchgeführt werden.