最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Facebook Marketing API ad creatives - Stack Overflow

programmeradmin2浏览0评论

I have the facebook application with approved ads_read, manage_pages ads_management, business_management and Ads Management Standard Access permissions.
I can create Ad campaign, ad set and can upload asset to Facebook via Facebook Marketing API.

But when I try to create ad creative, with /adcreatives request, I get Error with message:

(#3) Application does not have the capability to make this API call.

The example of curl request:

curl -X POST \
  '.3/act_<account_id>/adcreatives?access_token=<access_token_here>' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: graph.facebook' \
  -d 'call_to_action_type=USE_APP&actor_id=<page_id>&object_type=APPLICATION&status=active&name=hello&title=foo&page_id=<page_id>&id=act_<account id>&image_hash=fb1a69e0965076e791183ac82c9f7417'

I've tried making requests with app token, with page token and with user token (which was allowed in FB Business manager).
I've also tried with sandbox account and it's token
Every service (app, facebook page and user) connected with business account in business manager and have admin (max) permissions.

I've tried to send data in body with JSON request, I've tried to send data as x-www-form-urlencoded.
I've tried using plain http requests and tried with facebook-nodejs-business-sdk
But still no success.

So, the question is, what is the correct AD Creative create request and what permissions does my app need to perform such task?

P.S. I've also asked a few questions on Facebook Developers forum and got no solution. q1, q2, q3

I have the facebook application with approved ads_read, manage_pages ads_management, business_management and Ads Management Standard Access permissions.
I can create Ad campaign, ad set and can upload asset to Facebook via Facebook Marketing API.

But when I try to create ad creative, with /adcreatives request, I get Error with message:

(#3) Application does not have the capability to make this API call.

The example of curl request:

curl -X POST \
  'https://graph.facebook./v3.3/act_<account_id>/adcreatives?access_token=<access_token_here>' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: graph.facebook.' \
  -d 'call_to_action_type=USE_APP&actor_id=<page_id>&object_type=APPLICATION&status=active&name=hello&title=foo&page_id=<page_id>&id=act_<account id>&image_hash=fb1a69e0965076e791183ac82c9f7417'

I've tried making requests with app token, with page token and with user token (which was allowed in FB Business manager).
I've also tried with sandbox account and it's token
Every service (app, facebook page and user) connected with business account in business manager and have admin (max) permissions.

I've tried to send data in body with JSON request, I've tried to send data as x-www-form-urlencoded.
I've tried using plain http requests and tried with facebook-nodejs-business-sdk
But still no success.

So, the question is, what is the correct AD Creative create request and what permissions does my app need to perform such task?

P.S. I've also asked a few questions on Facebook Developers forum and got no solution. q1, q2, q3

Share Improve this question edited Jun 3, 2019 at 13:34 Grynets asked May 28, 2019 at 9:17 GrynetsGrynets 2,5251 gold badge21 silver badges41 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7 +50

I believe your input is malformed (although the returned errors from FB usually never indicate as much).

The main issue that I see is that the creative information is not being passed through the object_story_spec parameter. The type of creative you are making is passed in through this object along with the necessary parameters, which would be photo_data in your case.

curl -X POST \
  'https://graph.facebook./v3.3/act_<ACT_ID>/adcreatives?access_token=<TOKEN>' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: graph.facebook.' \
  -d 'link_url=<URL>&name=<CREATIVE_NAME>&object_type=PAGE&object_story_spec={page_id:<PAGE_ID>,photo_data:{image_hash:<HASH>,caption:<CAPTION>}}'

You will probably need to add or remove parameters as needed, but the above request worked for me.

In terms of permissions, here is what I had:

Some additional references:
Ad Creative
Object Story Spec
Photo Data

发布评论

评论列表(0)

  1. 暂无评论