Reputation: 523
Facebook is throwing "Please specify an image to run with this ad." when I try to create adcreative id in turn to create an ad. Its throwing an image error but the image_hash is valid and verified.
I followed the following documentation to create the image hash (which it successfully did) and tried to create a creative Id with it (which did not work)
https://developers.facebook.com/community/threads/427753334468444/
$post = array(
"name" => "Sample Name",
"title" => "Sample Title",
"body" => "Sample Body",
"object_url" => "www.facebook.com",
"image_hash" => "47b41fcdaf0bfed48ca3159ec07ffc70",
"access_token" => "I_added_valid_access_token_here"
);
$ch = curl_init('https://graph.facebook.com/v3.3/act_10***************/adcreatives');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$resp = curl_exec($ch);
curl_close($ch);
$respObj = json_decode($resp);
The following is what I got as response.
code: 100
error_subcode: 1487212
error_user_msg: "Please specify an image to run with this ad."
error_user_title: "Missing Image"
is_transient: false
message: "Invalid parameter"
type: "OAuthException"
I also found similar question that was posted on facebook community page 2 days ago but no answers yet. https://developers.facebook.com/community/threads/427753334468444/
I have been trying to solve this for couple of days now. I will appreciate any kind of help. Thanks in advance.
Upvotes: 4
Views: 3290
Reputation: 1
This worked out for me:
You have to re-upload the images you want to show in your ad.
I mean: Delete the images and upload them again in the window where you set your ad.
Upvotes: 0
Reputation: 980
I have the exact same issue. Found a workaround but it's not good enough for me since it needs a FB post or page to work. But maybe it's good enough for you. Possible workaround is to user object_story_spec
like so:
await account.createAdCreative([], {
name: "API TESTING",
object_story_spec: {
page_id: "34533453534534",
link_data: {
image_hash: adImageHash,
link: "yourlinkhere.com"
}
},
body: adData.Body,
appsecret_proof
});
Upvotes: 4