Facebook广告api添加广告错误

时间:2017-12-28 07:11:51

标签: java facebook facebook-ads-api facebook-marketing-api

我正在使用Facebook广告API来制作广告系列,广告和广告。我可以成功制作广告系列和广告。我也可以在更新api之前制作广告。

当我尝试添加新广告时,它会给我一个错误:

" Error: com.facebook.ads.sdk.APIException$FailedRequestException: {"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":1885833,"is_transient":false,"error_user_title":"Ad Must Be Associated With a Facebook Page","error_user_msg":"Ads and ad creatives must be associated with a Facebook Page. Try connecting your ad or ad creative to a Page and resubmit your ad.","fbtrace_id":"Edck5KvGF05"}"

创建新广告代码的示例如下:

AdAccount account = new AdAccount(accountID, context);
AdCreative creative = account.createAdCreative()
                        .setTitle("Java SDK Test Creative")
                        .setBody("Java SDK Test Creative")
                        .setImageUrl(adURL) // From URL
                        .setLinkUrl("www.facebook.com")
                        .setObjectUrl("www.facebook.com")
                        .execute();

所有参数均为真。我无法解决问题。有人可以帮帮我吗? 感谢

0 个答案:

没有答案