facebook canvas app install ad not getting published - facebook

We are facing some issues while publishing Canvas App Install Ads using facebook ads api.
We are getting this error while submitting the Ad. Ad Creative has been successfully created.
Ad Specs:
{
"adset_id":"XXXXXXXXXXX",
"name":"e2e canvas app create # app # 1407",
"bid_type":"ABSOLUTE_OCPM",
"creative":{
"object_id":"XXXXXXXXXXXX",
"actor_name":"e2e canvas app create # a",
"body":"e2e canvas app create # app # 1407",
"name":"e2e canvas app create # app # 1407",
"link_url":"LINK_URL",
"image_hash":"996e9f651b6bc8f86ee7ac83c72f0718"
},
"targeting":{
"genders":["1"],
"age_max":64,
"age_min":13,
"geo_locations":{"countries":["IN","CN","GB","ZA","RU"]}
},
"bid_info":"{
'ACTIONS':0,
'REACH':1500,
'CLICKS':0,
'SOCIAL':0
}",
"objective":"CANVAS_APP_INSTALLS"
}
Error:
Please include a value for 'user_os' or 'user_device' in ad targeting spec.|Exception|1487504

Related

Facebook not showing Banner after deployment to playstore

I have developed an Application using Flutter and with Facebook audience Package I've integrated the Ads to Flutter App
There's no issue with Interstitial or native ads
But banner ads are not showing in App after Deployment to the Play Store...
I have already made thousands of Ads Request to FaceBook banner Ads but there is NON-impression from FacebookHere is an image which doesn't have any impression!!! I don't know why
here is my CODE in Flutter (Dart)
Widget BannerWidget(placementId) {
return FacebookBannerAd(
placementId: BannerId,
bannerSize: BannerSize.STANDARD,
listener: (result, value) {
print("Banner Ad: $result --> $value");
},
);
}
Package name -> facebook_audience_network: 1.0.1
need Help and Thank you

InterstitialAd object is there in Admob and Facebook

Background : I am trying to have the Interstitial Ads from Admob and Facebook separately (Not via Mediation) . The facebook Ads will be triggered if the App is installed from Amazon App store.
Question : I need to declare the variable interstitialFromAdmob and interstitialAdFromFacebook. interstitialFromAdmob is for the Ad from Admob and interstitialAdFromFacebook is for the Ad from Facebook. For this Admob and Facebook has used the same Object InterstitialAd. Hence I am unable to declare the variables pointing the Admob and facebook separate. Please let me know how to resolve this
InterstitialAd interstitialFromAdmob;
InterstitialAd interstitialAdFromFacebook;
This is a very common case.
For those classes have duplicated short class name, a long or full path class name shall be used.
For examples, you can use:
com.facebook.ads.InterstitialAd internstitialAdFromFacebook;

Creating a Facebook ad creative from an app in development mode

I'm trying to create an ad creative in Facebook from my test app with the following request (pretty much taken from the Python SDK Docs here):
Message: Call was not successful
Method: POST
Path: https://graph.facebook.com/v2.4/act_somenumber/adcreatives
Params: {'object_story_spec': '{"link_data":{"caption":"www.example.com","image_hash":"existing_hash","link":"http://example.com","message":"try it out"},"page_id":"some_page_id"}', 'name': 'AdCreative for Link Ad'}
However, I get the following response:
Status: 500
Response:
{
"error": {
"code": 100,
"is_transient": false,
"error_subcode": 1885183,
"error_user_msg": "Ads creative post was created by an app that is in development mode. It must be in public to create this ad.",
"error_user_title": "Ads creative post was created by an app that is in development mode",
"message": "Invalid parameter",
"type": "FacebookApiException"
}
}
Now, I've seen a similar question, which states:
If you want to create ads from an app which is in development mode, this is possible, but the post you're going to promote must have been created by an app which isn't in development mode - i.e if your app is in development mode it's OK provided you're promoting existing page posts from a page's /promotable_posts endpoint and the app that created those posts is not itself in development mode
I'm not trying to create an ad; I'm merely trying to create an ad creative and then later update the ad to use that creative. What is the correct way of creating a new creative with link data from a development app? I have no problem creating ad creatives that correspond to right hand column ads, it's the newsfeed / feeds ads whose objectives are "Website Clicks". The ad in question was actually created through the ad manager, not through an app.
The work-around is simply to create a dummy app and set it publicly visible.

How to setup Facebook App Request from Unity with Prime31 Social combo plugin?

my problem is this, when the user is asked to select friends from the list and click on Send I receive a Success state from callback but no request is reached from the people selected in the list.
My setup is this:
- my app is a native app for iOS and Android made in Unity
- my app is registered in Facebook developer portal as Game/Puzzle, I set up bundle id, package name, display name and namespace
- my app is not yet published
- I configured the Prime31 Facebook plugin with the appId given from Facebook and Display Name
I send my request like this:
public void AskLifesOnFacebook()
{
var parameters = new Dictionary<string, string>
{
//{ "app_id", "#######my_app_id_number####" },
{ "method", "apprequests" },
{ "title", "My request title" },
{ "message", "My request text" }
};
FacebookCombo.showDialog("apprequests", parameters);
}
But still the friends selector is shown up correctly on an overlay windows, I select friends and send the request but no request is received.
Am I missing something in the configuration of my app on Facebook? Do I need to pass some kind of certification?
From the same app the stream.publish is working correctly and I can publish on user walls.
The setup with Prime31 plugin and the call are correct!
You have to enable "Single Sign On" and "Deep Linking" in Facebook app parameters and add a valid itunes ID for your app (while testing you can put any valid ID, but you should create a itunes connect entry for your app and get the final ID).
When your app is a native iOS app, the users see the notifications only through the Facebook iOS app, so they are guarantee they can open iTunes or run the game.
Global notifications instead (ej: regular browser on PC) are seen if the app is in a Facebook Canvas.

Can't send FB Notifications with new API

Really need some help with this one!
I'm trying to send notifications from a canvas app using the new notifications API but I keep getting the following exception:
OAuthException: (#200) Only web canvas apps can send app notifications
However, the app IS loaded in the Facebook canvas -- I'm making an ajax call to my server when the user takes a particular action which triggers the notification POST request. The user has also authorized the app.
This is the code I'm using:
$graphUrl = $user_id . "/notifications";
$params = array( "access_token" => $admintoken,
"href" => $link,
"template" => "string of text < 180 chars"
);
try {
$result = $facebook->_graph($graphUrl, 'POST', $params);
} catch (Exception $e){
echo $e;
}
I just ran into this too and this is how I solved it, but this may not be relevant to you as you seem certain yours is a Canvas app. Mine is an app that mostly runs off Facebook, but has Facebook integration hooks that means users can authorise my Facebook App and then receive updates about interesting events via the Facebook framework.
I went to edit my App settings in the Facebook Developers app, look on the Settings->Basic page near the bottom. I only had "Website With Facebook Login" checked. I checked "App on Facebook" and this gave me a "Canvas Page" and various other settings. With these filled in and saved, the POST to uid/notifications worked immediately.
Incidentally, going to apps.facebook.com/myappnamehere fails because it redirects to https and the request to my site fails because my SSL isn't set up right, but this didn't prevent notifications being sent under that apps credentials.
Recently, I was facing this same issue and I found that Facebook Web Games are formally known as Facebook Canvas.
So, Just create an Facebook game configuration under Settings->Basic page (You will see add button at the bottom of this page) and your API will start sending notifications.
1:\ Go to developer.facebook.com
2:\ Go to your app Settings \ Basic
3:\ Add new platform from plus at button bottom of the page
4:\ Choose Facebook Canvas
now you may need to fill form with your url
That's it