Creating Facebook Newsfeed ad with Website Conversions as a goal - facebook

I'm trying to create an ad for an unpublished page post (link type) via FB Ads API with goal set to WEBSITE_CONVERSIONS. I was a bit puzzled by api docs, so I checked hwo FB Ad Manager does this and notices it send "OBJECTIVE" parameter to FB - something that doesn't exist in API Docs at all
I have a php script in cURL that does the job, sending the following to act_xxxx/adgroups endpoint:
method=post
access_token=xxxxxxxxxxxxxxxxxxxxxxxxxx
name=CURL 001
campaign_id=xxxxxxxxxxxxxxx
targeting={"countries":["US"],"age_min":13,"broad_age":1,"page_types":["feed"]}
bid_type=ABSOLUTE_OCPM
bid_info={"ACTIONS":25}
adgroup_status=ACTIVE
creative={"type":27,"object_id":"XXXXXXXXXXXXXX","story_id":"XXXXXXXXXXX"}
objective=WEBSITE_CONVERSIONS
conversion_specs={"action.type":["offsite_conversion"],"offsite_pixel":["XXXXXXXXXXX"]}
redownload=1
When I go to FB Ad Manager and open the campaign, I can see the ad with correct objective set. Everything looks OK even if I open it with FB Ad Manager.
However, when I send the same request using the application I work on, things get messy. From FB Ad Manager campaign view, everything looks OK, but when I open the ad for editing, I get the following error for my Objective: You've entered a destination that can't be used with the Website Conversions objective. Edit Objective.
So, am I missing something, is there a point in API where this is explained?
Thank you and sorry for the long explanation.
EDIT: After inspecting the ad I created via FB Ads Manager, I noticed that creative it generated had (among other) title, image_url and link_url fields, even though creatives of type 27 shouldn't have those (according to https://developers.facebook.com/docs/reference/ads-api/adgroup/). Maybe it's something new?

After noticing the same issue arises when using the Power Manager, I reported a bug and was explained that this is by design, i.e. currently it's not an option available via API. Users who use API should define their goals implicitly by setting the correct bid info (e.g. "Clicks to website" is set by selecting bid_type=CPC or ABSOLUTE_CPM and setting appropriate bid_info.

Related

Unexpected "Cannot call API on behalf of this user" after upgrading to graph api 2.10

We've allowed sign up/access to our website using Facebook Login for a long time. Two days ago, after upgrading to graph api 2.10, this stopped working for a portion of our users. Myself and most others are unaffected.
The error message received in the Access Token response reads "Cannot call API on behalf of this user".
I can't find anything in the 2.9 -> 2.10 changelog that mentions anything remotely connected to this problem, and I've found very little on this issue externally.
A few posts suggests that it might have something to do with insufficient privacy policy settings in our Facebook app settings, but everything is in place expect the non-mandatory Data Deletion Request URL. The fact that it also works perfectly fine for me as an EU citizen (affected by GDPR) says to me that it's something else. We do not have any country restrictions in place, and those who are affected by this comes from a variety of countries both inside and outside of the European Union.
Does anybody recognize this problem?
I ran into the same problem, also after an update (from 2.9 to 3.1). The fix for me was to remove location restrictions within the facebook console (Settings > Advanced > App Restriction > Contry Restricted):
I got this idea from a comment on this similar question, and this google group thread.
ref: https://developers.facebook.com/docs/audience-network/optimization/apis/FB-login-Reporting-API
sounds like the app type should be Business
today I meet this error, follow above document, I new create a business app, then error be resolved.

How can I get owner email for a Facebook App using the App Access Token

How would I get the email address associated with an active Facebook App ID, if all the usual methods (such as here, and here) don't return any email information with my creator-uid?
(I simply don't get the email field returned, even when I specifically request it as per here. I don't think this is a case of this as I didn't get an "App has no owner" error, or any error whatsoever.)
I've also tried this, but I'm in a catch-22 as I can't log in to select the application first.
I'm looking for the owner email address, so I can log in to make administrative updates following graph API updates.
Other specifics:
I get the following when I hit the Graph API via: https://graph.facebook.com/{my-app-id}?access_token={my-access-token} or https://graph.facebook.com/{my-app-id}?access_token={my-access-token}&fields=email
{
"name": "my-name",
"id": "my-creator-uid" }
I've tried to recover my FB account using all emails I can think of, but FB says 'no account exists' for each that I try. (This is a data-analytics corporate account being used to gather data for 12+ months, so I can't simply create a new account/app ID and start using that instead, as app-scoped user IDs will change.)
I've also tried viewing https://www.facebook.com/app_scoped_user_id/{my-creator-uid}/ and https://www.facebook.com/{my-creator-uid}/ from another company FB account, but both get:
Sorry, this content isn't available right now The link you followed
may have expired, or the page may only be visible to an audience
you're not in.
What else would you suggest? What might have happened? I've tried to contact Facebook, but that search led me to this forum post, so I'm here. Thank you in advance for your help.
This is not a programming question, try to get in touch with the Facebook Team, if you are working with Facebook paid services (like Advertising) you might have an account representative that can accelerate the things a little bit (But this can be a really long wait).
A more realistic option is to create a new profile and an new app, also your application will be reviewed as well (Take a little less time than previous option).

Facebook API Campaign Create

Some background...
I'm trying to create a Campaign using the graph.facebook.com API. When I post, I get an ID back, which I thought would most likely be the Campaign-id, when I do a Get, I am returned a list of ID's...presumably campaigns.
When I go the AdManager page to see all my campaigns there is nothing. I have tried searching Adverts and Adsets, but also nothing. I now have a list of Id's but no idea what they actually represent.
If I do a GET on one of Ids I was hoping I might get some further information about the object (node), but instead I just get the id back and nothing else.
The AdAccount I am POSTing the campaigns to is a SandBox account, not sure if this makes a difference.
...
Can anyone confirm whether or not the id I am receiving is likely to be the CampaignId?
Is there a special way to see campaign's created for a sandbox account?
Is there a further stage I need to complete to get the Camapigns to show up?
many thanks.

Facebook bot get rid of default message

I am following tutorial from https://github.com/jw84/messenger-bot-tutorial
I am getting this message "The Default answer block is your bot’s default response to any input from a user. Create messages in this block that will guide your users. You can add buttons that lead users to other blocks. Remember, you also can use “AI Setup” to choose what blocks to show based on users' input." everytime I write anything random in messenger
This response is generated automatically by chatfuel. Check to see if you have linked chatfuel to your bot. If you intentionally used chatfuel you can change its default response from the dashboard. If you were like me, I setup chatfuel initially but decided it wasn't robust enough for what I wanted to do, and then I used Howdy botkit, but the chatfuel ai was still linked so I got the chatfuel default message + howdy botkit responses. I had to delete the chatfuel link so that I could only get responses from Howdy.

is it possible to integrate my custom logging system to google adsence ad tag

i have a custom logging system,
my client provide me a script of google adsence ad tag
(which using domain http://adserver.adtech.de/addyn/ with ad tag id and other staff )
and i want to track how many clicks on this ad tag
So i need to integrate my custom logging system to google adsence,
by using some parameter like in double click or other 3 rd party media company
is it possible to do that?
I think you would be better of using the Adsense API to retrieve this information http://code.google.com/apis/adsense/management/v1/reference.html#collection_reports
I don't know what success you'll have trying to intercept the click event on the ads. Even if you could get it to work (which is unlikely as it's rendered from a different domain) Google would likely ban you for tampering with the ads