当我用facebook graph api
制作广告时,出现如下错误
{"error_user_msg": "You don't have required permission to access this profile", "code": 10, "type": "OAuthException", "message": "Application does not have permission for this action", "fbtrace_id": "BTycRY47T1m", "error_user_title": "No permission to access this profile", "error_subcode": 1341012, "is_transient": false}, {"error_user_msg": "You don't have required permission to access this profile", "code": 10, "type": "OAuthException", "message": "Application does not have permission for this action", "fbtrace_id": "ElyXM7OX//O", "error_user_title": "No permission to access this profile", "error_subcode": 1341012, "is_transient": false}]
页面已升级,用户的任务为['ADVERTISE', 'ANALYZE']
,但它始终无法创建广告?
您能告诉我此错误的原因吗?非常感谢。
更新:
部分主要代码:
...
elif params.objective=="PRODUCT_CATALOG_SALES":
# https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/ads-management/?translation#adtemplate
cre["object_story_spec"]={
"page_id":params.page_id,
"template_data":{
"call_to_action":{
"type":c["type"]
},
"name":c["link_text"],
"description":c["description"],
"link":c["link"],
"message":c["message"]
}
}
cre["product_set_id"]=params.product_set_id
ad={
"name":"Ad_{}_{}".format(params.name,i+1),
"creative":json.dumps(cre),
"status":"PAUSED"
}
ads.append(ad)
...
# then use batch request, and user token to create some ads at one time.
使用user token
批量创建广告