4

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.

user4504661
  • 493
  • 7
  • 14
  • Does this answer your question? [:"Missing Image","error\_user\_msg":"Please specify an image to run with this ad](https://stackoverflow.com/questions/56162535/missing-image-error-user-msgplease-specify-an-image-to-run-with-this-ad) – y2k-shubham May 03 '20 at 14:52

2 Answers2

4

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
});
Alex D
  • 970
  • 6
  • 13
  • i try this one but it's not working. i have an issues on image hash. Have yo any idea how to upload and make image hash. just want to know how to write the path of image. – imnhasan Feb 21 '21 at 04:16
0

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.