admin管理员组文章数量:1389897
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
1 Answer
Reset to default 7 +50I 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
本文标签: javascriptFacebook Marketing API ad creativesStack Overflow
版权声明:本文标题:javascript - Facebook Marketing API ad creatives - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744610827a2615643.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论