ShadowIGUserBrandedContentAdPermissions
GET /v25.0/{ig-user-id}/branded_content_ad_permissions 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}/branded_content_ad_permissions',
'{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}/branded_content_ad_permissions",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{ig-user-id}/branded_content_ad_permissions",
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}/branded_content_ad_permissions"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];| 參數 | 說明 |
|---|---|
creator_usernamestring | FIlter for specific creator username |
由此關係連線進行的閱讀將回傳 JSON 格式結果:
{ "
data": [], "paging": {} }
data將在每個傳回的節點新增以下欄位:
| 欄位 | 說明 |
|---|---|
brand_ig_idinteger | brand_ig_id |
brand_usernamestring | brand_username |
creator_fb_page_idnumeric string | creator_fb_page_id |
creator_ig_idinteger | creator_ig_id |
creator_usernamestring | creator_username |
permission_created_timeinteger | permission_created_time |
permission_statusstring | permission_status |
permission_urlstring | permission_url |
paging| 錯誤 | 說明 |
|---|---|
| 100 | Invalid parameter |
| 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. |
| 190 | Invalid OAuth 2.0 Access Token |