Ad Images that belong to this Ad Account.
GET /v21.0/{ad-account-id}/adimages 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(
'/{ad-account-id}/adimages',
'{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(
"/{ad-account-id}/adimages",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{ad-account-id}/adimages",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{ad-account-id}/adimages"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
參數 | 說明 |
---|---|
biz_tag_id int64 | Business tag ID to filter images. |
business_id numeric string or integer | Optional. Assists with filters such as recently used. |
hashes list<string> | Hash of the image. |
minheight int64 | Minimum height of the image. |
minwidth int64 | Minimum width of the image. |
name string | Image name used in image names filter. |
由此關係連線進行的閱讀將回傳 JSON 格式結果:
{ "
data
": [], "paging
": {}, "summary
": {} }
data
paging
summary
與關係連線相關的彙總資訊,例如次數等。請在摘要參數中指定要擷取的欄位(例如 summary=total_count
)。
欄位 | 說明 |
---|---|
total_count unsigned int32 | Total number of images in the Ad Account. |
錯誤 | 說明 |
---|---|
100 | Invalid parameter |
80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-management. |
200 | Permissions error |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
190 | Invalid OAuth 2.0 Access Token |
2500 | Error parsing graph query |
adimages
edge from the following paths: 參數 | 說明 |
---|---|
bytes Base64 UTF-8 string | Image file. Example: |
copy_from JSON or object-like arrays | This copies the Ad Image from the source to the destination account. |
images
的節點。hash
: string, url
: string, url_128
: string, url_256
: string, url_256_height
: string, url_256_width
: string, height
: int32, width
: int32, name
: string, 錯誤 | 說明 |
---|---|
80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-management. |
100 | Invalid parameter |
200 | Permissions error |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
190 | Invalid OAuth 2.0 Access Token |
/act_{ad_account_id}/adimages
提出刪除要求,中斷 an AdImage 和 an AdAccount 的關聯。參數 | 說明 |
---|---|
hash string | Hash of the image you wish to delete. 必填 |
success
: bool, 錯誤 | 說明 |
---|---|
100 | Invalid parameter |