3

We are trying to create dev environment for fetching ads insights in development mode.

We are able to achieve below items except ad creative & ad creation

  1. Sandbox Ad Account test user
  2. Access token with required permissions for ad insights.
  3. Using Access token we are able to create adset, campaign, upload image.
  4. We are getting below response when we try to create ad creative

Response: { "error": { "message": "Invalid parameter", "type": "OAuthException", "code": 100, "error_subcode": 1885183, "is_transient": false, "error_user_title": "Ads creative post was created by an app that is in development mode", "error_user_msg": "Ads creative post was created by an app that is in development mode. It must be in public to create this ad.", "fbtrace_id": "DtL9CQLDa1T" } }

& Access token become invalid, if we put app in public mode.

Request :

curl -X POST \
  'https://graph.facebook.com/v3.0/act_1966727743624778/adcreatives?access_token=<Token>' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: bf7aeed1-0391-441c-be78-a62528ecdaac' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'name=blabla creative' \
  -F 'object_story_spec={ "link_data": { "image_hash": "10c7a77ac2d0d19ba36a246d6f9ea0dd", "link": "https://app.google.com", "message": "try it out"     },    "page_id": "<pageid>"}'

1 Answers1

2

The error is saying that you're trying to create an ad where the creative is based on a post which was created by an app in development mode. Because that post won't be visible to anyone other than developers of the app which created the post, that's not allowed.

Create the ad using a post which already exists on the page, or make sure the app you're using to create the posts isn't in development mode (remember, you can use a hidden/unpublished post for the ad)

Again, the problem isn't the 'ad' being created by an app in development mode, its that the post the ad is promoting was created by an app in development mode

Igy
  • 43,710
  • 8
  • 89
  • 115
  • I didn't get your point on post by public app as we are not creating any post yet. curl -X POST \ 'https://graph.facebook.com/v3.0/act_1966727743624778/adcreatives?access_token=' \ -H 'Cache-Control: no-cache' \ -H 'Postman-Token: bf7aeed1-0391-441c-be78-a62528ecdaac' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F 'name=blabla creative' \ -F 'object_story_spec={ "link_data": { "image_hash": "10c7a77ac2d0d19ba36a246d6f9ea0dd", "link": "https://app.google.com", "message": "try it out" }, "page_id": ""}' – Abhijeet Suryawanshi Aug 21 '18 at 03:06
  • So, if you're not using an existing post, the most likely problem is that the app you're using to create the ad is in development mode, so the new post which is created to represent the object_story_spec would be invisible - take the app out of development mode – Igy Aug 24 '18 at 15:59
  • Thanks, If we move app from dev to public then the token becomes invalid. – Abhijeet Suryawanshi Aug 27 '18 at 08:03
  • I second @AbhijeetSuryawanshi here. If I take the app from dev to public, I cannot provide the ads_read and ads_management permissions to that test user (who happens to be the Sandbox Ad Account Owner). The permissions just don't appear. The app has to be in dev mode. – Alex Dec 04 '18 at 02:35
  • Yes facing the same problem – Hammad ul Hasan Nov 05 '19 at 07:05