问题
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
- Sandbox Ad Account test user
- Access token with required permissions for ad insights.
- Using Access token we are able to create adset, campaign, upload image.
- 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:
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
来源:https://stackoverflow.com/questions/51926462/unable-to-create-ad-creative-using-facebook-graph-api