How can I use automatic bid pricing on the Facebook Ads API? - facebook

I'm using the Facebook Ads API to create Page Post Engagement ads. The API is in general a breeze to use but I can't seem to find a way to set automatic bid pricing or, in other words, achieve this:
rather than this, which is what I'm getting:
My ad set is being created with bid_type: "ABSOLUTE_OCPM" and bid_info: "{'ACTIONS':500}". bid_info is a required parameter so I can't leave it out. Setting it to 0 doesn't work either.
Any ideas?

bid_info is required only if you set is_autobid to false, which you need to set to true when you create your set.
With bid_type: "ABSOLUTE_OCPM" and bid_info: "{'ACTIONS':500}" you are saying that you'd like to bid 500 units of account's currency on action, which are expressed in cents. And as you are requesting Optimized CPM, you say how much the fulfillment of a particular goal is worth to you, therefore the $5.00 USD always show up there. As per FB Optimized CPM documentation these values are not bids.

There is no official way to set automatic bid via API. Moreover, usually you can just use oCPM and bid the same amount used by Facebook when you create a campaign using the automatic bid. Then PowerEditor will show you that you're using automatic bid.
=== NEW FROM v2.3 ===
From version 2.3 there is the is_autobid field. By setting it to true Facebook will set the bid value automatically. You can read more here: https://developers.facebook.com/docs/marketing-api/adset/v2.3#create

Related

Changing "purchasable" in WooCommerce using REST API

I am trying to update the "purchasable" flag on a product variation using REST API
/wp-json/wc/v3/products/<prodID>/variations/<varID>
I have tried sending a simple
{"purchasable":false}
as well as getting the current data for the variation, changing the "purchasable" entry to the new state, and submitting the entire data back to WooCommerce. In no case have I been able to change this value using REST API.
I am using jw-auth for authentication and have a proper token (I do receive a proper response back with all the data for the variation, but still with the old value of "purchasable" in it, so I know I'm communicating with the back-end).
Is there some setting elsewhere that needs to be set for me to be able to change this specific property? The variations have been created using REST API as well, and on the shop it works fine (I can pick the variations as expected).
What am I doing wrong? Or have I found a bug in WooCommerce? :-)
That field is listed as ReadOnly in the api docs. I believe Woo uses other criteria to set that value. In my research, it appears that setting the Stock Status to "outofstock" seems to be a common method for keeping an item from being purchased. Also, setting the price to null or empty.
https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties

where is the “Recently Used”,“In Active Adverts”, "Action Needed", "Shared" filtering based from facebook custom audience data?

If you go to business manager of facebook, then go to the "All Audiences", then under the "Audiences" tab, you will see a "Filters" button right beside the "Create Audience" button. Now my question is, which part the json data being provided by the facebook apis should I based the data that I should pull out based from these filters ?
- Recently Used
- In Active Adverts
- Action Needed
- Shared
Because unlike the "ready" and "not ready" status, those four filters that I mentioned are not straight forward where I can just look for the numbers from the returned json data. so how ?
Most likely, not all of this information is available through the API.
However, if you take a look at the following doc, you can see some reelvant fields that may help:
https://developers.facebook.com/docs/marketing-api/reference/custom-audience
Most likely you can use the field operation_status to look at whether an audience needs action.
For whether it's shared, take a look ad the edge adaccounts which will let you see the ad accounts this audience has been shared with.
For recently used, you'll probably have to look at the edge ads and review the status of the ads.
To save having to make multiple requests, you can take a look at field expansion in the Graph API, which will let you query for fields of objects in results using a single request:
https://developers.facebook.com/docs/graph-api/using-graph-api#fieldexpansion

CPA auto bid API

i heard somthing about an option to upload CPA campaigns with auto bid. couldnt find this option in the API support.
did anyone hear anything about it?
This is a property on adset level. Set the property is_autobid to true when creating the adset. According to:
https://developers.facebook.com/docs/marketing-api/reference/ad-campaign

Facebook Marketing API some field are not shown

I have a development level access to Marketing API and it looks like I cannot read some fields of specific objects.
For example I try the following call:
You can see that promoted_object, link_url and object_url are not displayed in the result. And I should have one of those three value as the Ads was ad to promote "web site click".
Is it a bug or a limitation of the development acces or I am doing something wrong?
It is true that not all fields are readable by all apps, however in the case above it is most likely that these fields are empty on that object and therefore not returned in the response.
Promoted object, for example, is required on the adset level now, however it may be the case the adset you are trying to read is very old and therefore does not have one specified.
In regards to the creative fields, again not all creatives have these fields and in the case they are empty, are not returned in the response. You should check the promoted_story_id to see if this contains what you're looking for.

In Facebook Graph API - Is LIMIT parameter realy functional?

I'm trying to collect all the posts of my company page with this kind of query
https://graph.facebook.com/v2.2//feed?limit=250&fields=id,type,status_type,comments{id},likes{id},shares
Problem is that I'm not collecting all posts.
I will have a better result with limit=20 and some time with limit=100
Most of the pages (from the pagination mechanism point of view) will not have 100 items.
I know some posts may not be exposed because of privacy settings.
My issue is that a call with limit=20 is not returning once going through pagination the same amount of data as limit=250.
How could it be?
How providers of Facebook Analytics can garanty the quality of data they collect ?
The Facebook graph api only allow the max of 100 items per request, despite you specify more than that.
Afaik the limit parameter is indeed buggy. But 250 would be a very high value, there is a max value for the parameter too - i assume it depends on the API call how high it is, could be fixed too.
Better don´t use limit at all and use paging to get more results: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#paging