Questions tagged [facebook-ads-api]

The Facebook Ads API (aka Marketing API) is used by application developers to create, manage and measure ad campaigns that run on Facebook.

The Facebook Marketing API (previously referred to as Ads API) is an interface into Facebook to create ads, manage campaigns, and measure the performance of a campaign. The Facebook Marketing API has various levels of access, some of which may require an application and review process. See Facebook's Marketing APIs access documentation for more details.

The Facebook Marketing API is a subset of the Facebook Graph API where requests and responses are sent over HTTP and the responses are usually returned as JSON.

The Facebook hosted documentation is available here: Facebook Marketing API Documentation

867 questions
4
votes
1 answer

What is difference between spend and social_spend in Facebook Ads API?

Working with the Facebook Marketing API - https://developers.facebook.com/docs/marketing-api/insights/fields/v2.7 What is the difference between spend and social_spend? I assume that spend would be total, and social spend out be a subset of that…
Joshua Dance
  • 8,847
  • 4
  • 67
  • 72
4
votes
1 answer

Get Facebook Ads Insights results into pandas dataframe

I'm trying to get the results of a Facebook ads insights query into a pandas dataframe but the returned object is not cooperating. I'm running a basic async usage example as is outlined by Facebook here:…
4
votes
0 answers

Facebook Native Ads video height Android

I have been implementing Facebook Native Ads for Android according to this guide: Native ads for Android And i have this problem: When i set width and height of my parent view to WRAP_CONTENT, all static ads(images) are sized and shown fine. But…
4
votes
1 answer

Tracking custom events in FB analytics

Facebook analytics has their 9 event types: https://developers.facebook.com/docs/marketing-api/facebook-pixel/v2.5 But what about custom events? The docs say that custom events can only be used to build custom audiences. How can you measure custom…
Miles
  • 1,615
  • 4
  • 17
  • 42
4
votes
3 answers

Facebook Native Ads on iOS

I'm trying to implement native ads from Facebook in my app. I put the code exactly like Facebook said, and it works. But only if the app was installed via xCode. If the app is installed via Test Flight the ads never appears. Any ideas? My Audience…
Eduardo Iglesias
  • 1,056
  • 18
  • 42
4
votes
2 answers

How to calculate Estimated Daily Reach using fb api

I want to show the daily estimated reach using fb api. I have tried below code :- $ch = curl_init(); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); …
Khushboo
  • 1,819
  • 1
  • 11
  • 17
4
votes
1 answer

Facebook Ads API AdSet Creation Normalization Error

I'm getting an odd error from the Facebook ADs API. Sending the following payload: { "campaign_group_id": "54321", "bid_type": "ABSOLUTE_OCPM", "name": "Hello AdCampaign", "bid_info": { "ACTIONS": 1 }, "targeting": { "behaviors":…
Rabbott
  • 4,282
  • 1
  • 30
  • 53
4
votes
1 answer

Accessing Facebook Ads API request error 270

I have a whitelisted Facebook App that is out of sandbox mode and has been approved for the Ads API, but I am receiving the following error when trying to make requests to the Ads API. { "error": { "message": "(#270) This Ads API request is…
mindreave
  • 45
  • 1
  • 5
4
votes
2 answers

Upload image_file using Ads API

I'm trying to create a new Ad Creative for an event ad (Post-Migration), using the field image_file. Via the Graph API Explorer I send the following post request: URL: https://graph.facebook.com//act_xxxx/adcreatives object_id: xxxxx …
Alon Shmiel
  • 6,753
  • 23
  • 90
  • 138
4
votes
3 answers

Facebook conversion pixel with "server to server" option

I'm investigating usage of CPA ad types in our application and was reading about pixels for tracking conversions. It states that there are JS/HTML pixels available, but I'm wondering if there is a pixel that could be triggered on server side, (i.e.…
dan
  • 136
  • 8
4
votes
2 answers

Are start/end times needed to query Ads API stats? (how to adjust for daylight savings time)

I’m attempting to query Ad Group stats API for an Account for a full day’s worth of data. The Facebook documentation recommendation is to specify start and end dates along with times (in UTC) as relates to the ad_account time zone, as in the…
Jason13
  • 86
  • 7
4
votes
1 answer

Social Context in Ads w/ Redirects

I'm trying to apply the "Social Context in Ads w/ Redirects" to our creative editor with no luck. Creating a type 1 creative using a URL redirecting to my Facebook page and setting the "follow_redirect" flag to 1. The creative is created…
Gal Bracha
  • 19,004
  • 11
  • 72
  • 86
3
votes
0 answers

What's the API method to retrieve the destination website URL of a Facebook ad?

(1) I need to extract the link inside a facebook ad. When creating a facebook ad , we need to fill in destination, where we need to fill website url, how can I get this value from some facebook api. Basically the link where the ad redirects to. (2)…
3
votes
0 answers

Can the Facebook Marketing API return a list of objects that represent each individual click on an ad, including the FBCLID and spend for each click?

So far I've been able to get an overview of the total number of clicks during a specified time period using the Insights API: {"impressions":"5547","spend":"160.53","clicks":"206","date_start":"2022-06-08","date_stop":"2022-06-08"} What I would…
3
votes
0 answers

Why "Fbclid" is not enough for attribution?

I've been tormented for a few months by this question! I don't understand how Facebook pixel works deeply (and I assume only FB devs Know) but I have a few questions, if anyone can help me: 1- I launch a conversion campaign on Facebook ads, a…