floatinghotpot / cordova-plugin-facebookads

Cordova/PhoneGap plugin for Facebook Audience Network Ads
65 stars 70 forks source link

2000 server error #13

Closed manuelpaulo closed 9 years ago

manuelpaulo commented 9 years ago

Using your own example code and only that, I get:

2015-08-01 04:15:30.337 MyApp[27775:223365] [FBAudienceNetworkLog/FBAdProvider:137 <error>] Ad request error: Error Domain=com.facebook.ads.sdk Code=2000 "Server Error" UserInfo=0x7feced9940d0 {NSLocalizedDescription=Server Error, FBAdErrorDetailKey={
    url = "https://graph.facebook.com/network_ads_common/";
}}
2015-08-01 04:15:30.337 MyApp[27775:223365] FacebookAds, onAdFailLoad, {'adNetwork':'FacebookAds','adType':'banner','adEvent':'onAdFailLoad','error':2000,'reason':'Server Error'}

Notes: Clean project with only your plugin and your example code, tested on simulator and real device, internet connection is fine. I am in the EU and have no firewalls, government limitations or ad blocks.

floatinghotpot commented 9 years ago

Pleas change the app id to your own.

manuelpaulo commented 9 years ago

Already did that, previously to testing your own example. Same problem... :(

floatinghotpot commented 9 years ago

Did you get your app id approved in Facebook audience network?

manuelpaulo commented 9 years ago

You are absolutely right. First when I copy paste my App id, I missed one char and got the 2000 server error message. Then, I tried a clean app with your code only and got the same message. Lastly, the app id on your code used to work a couple of months ago. I know for sure cause I also pulled out an old code I was sure it was working some time ago, and got the same message.

What should be fixed, imho.

You, or Facebook should not return an undocumented error code when app id is wrong. https://developers.facebook.com/docs/marketing-api/error-reference

You should remove the app ids on your exemple code, since as is, the code is not working https://github.com/floatinghotpot/cordova-plugin-facebookads/blob/master/test/index.html

Last, but not least, thanks for helping so much the community. Also, since there is no longer a free version, how are you being paid now for your work? Still the 3% ad cut only?

floatinghotpot commented 9 years ago

The app id in index.html is for demo purpose only, and may not work any more, you have to replace it with your own app id.

It's up to you to choose one of the options, either no need to spend a cent but share 2% ad traffic, or pay $20 for a license to disable the ad traffic, see: http://rjfun.github.io/

manuelpaulo commented 9 years ago

Thanks!