facebook-ads-api

FB Ads API (#17) User request limit reached

女生的网名这么多〃 提交于 2019-12-06 11:35:25
I am working on Facebook ads api to get the account Campaign data.What I am doing here is I get list of all campaigns and doing forloop of each campaign get Campaign stat $campaignSets = $account->getCampaigns(array( CampaignFields::ID, CampaignFields::NAME )); foreach ($campaignSets as $campaign) { $campaign = new Campaign($campaign->id); $fields = array( InsightsFields::CAMPAIGN_NAME, InsightsFields::IMPRESSIONS, InsightsFields::UNIQUE_CLICKS, InsightsFields::REACH, InsightsFields::SPEND, InsightsFields::TOTAL_ACTIONS, InsightsFields::TOTAL_ACTION_VALUE ); $params = array( 'date_preset' =>

branch.io deep-linked URL not passing data in App from Facebook Ads

假装没事ソ 提交于 2019-12-06 10:38:31
问题 We are using branch.io to pass custom data to App. For that we are following this steps in branch dashboard. 1) Ads -> Partner Management -> Facebook -> Create Facebook Link 2) Set data in Key/Value under " Deep Linking " Section (data which we need in our app) 3) We set Play/App Store URL in Android/iOs respectively Or set Default Redirects under " Redirects " section That's it!!! Now Go to Facebook Ads Manager and select App Install Campaign. 1) Select Play/App Store under App Section. 2)

retrieve async ads insights results from FB ads API with pagination

隐身守侯 提交于 2019-12-06 02:23:57
问题 I am using facebook-python-ads-sdk to make async calls for FB insights API as described. params = { "time_increment": 1, "level": "ad", "date_preset": "last_28d", "breakdowns": "hourly_stats_aggregated_by_advertiser_time_zone", "limit": 1000 } job = AdAccount("id").get_insights_async(params=params) result_cursor = wait_for_async_job(job) results = [item for item in result_cursor] def wait_for_async_job(job): for _ in range(TIMEOUT): time.sleep(1) job = job.remote_read() status = job

Facebook conversion pixel with “server to server” option

纵饮孤独 提交于 2019-12-06 00:15:51
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. using file_open from our script). This would be a huge benefit for my app, since it would enable me to lower discrepancy and also allow more flexibility. Does anyone have an idea? No, there is no ability to record conversion using a server-to-server method at the moment. Now you have options for behavior like this. Note: You cannot fire a "piexl"

Facebook Native Ads on iOS

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 12:57:38
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 Network permission is enable, as well as my ad placement I have facing this problem when using Testflight beta testing, I switch to Fabric beta testing and the facebook native ad shows. Just put the app on app store and will be fine. Remember to uncheck the "Limit Ad Tracking" in the device settings. https://developers.facebook.com/docs/audience

How to calculate Estimated Daily Reach using fb api

别等时光非礼了梦想. 提交于 2019-12-05 12:01:07
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); curl_setopt($ch, CURLOPT_USERAGENT, 'facebook'); $url_en = urlencode("{'geo_locations':{'countries': ['US'],},'age_min':20,'age_max':24}"); curl_setopt($ch, CURLOPT_URL, "https://graph.facebook.com/v2.2/act_1375199556085956/reachestimate?access_token=ACCESS TOKEN&targeting_spec=".$url_en); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL

Facebook Mobile Ad App Installs not showing up in campaign reports

99封情书 提交于 2019-12-05 09:56:06
I have successfully implemented the Facebook SDK and AppEvents to report installation of my Android app. I have verified that it registers the last install data in the dashboard, and I see thousands of fb_mobile_activate_app events in my App Events tab on Facebook. I have been running a paid campaign on the app, however, even after over 24 hours since adding the SDK, I am getting reports of 0 installs. Since I am basing my budget on how the ads perform, it seems odd to not have any data. Is there something I am missing here? Be sure you have your goal point to a Facebook app, and never have to

Possible to specify date_preset with insights edge in Facebook Ads API?

风格不统一 提交于 2019-12-05 08:39:01
For the Marketing API, I know that I'm able to make one call to retrieve all of the adsets from a certain account along with their insights, but am I able to specify the date_preset for the insights edge in that same call? For example, the following gives me lifetime insights stats: /v2.4/{accountID}/adcampaigns?fields=insights To be clear - I know this is possible to retrieve by making separate calls for each adset id (where I know I can specify the date_preset); instead, I'd like to do this via the call where I get a long list of the ad sets plus their insights details in one go. Yes this is

Facebook Ads Api Request fails with #273 requires user to be admin

落花浮王杯 提交于 2019-12-05 08:10:24
I'm trying to query the Facebook Ads API with the Graph Api Explorer. I have two Ads Account connected to me (if i query /me/adaccounts/ I see both) one is my own and the other one I'm only admin on but not owner. The Problem is with the one I'm not the owner. If I query my Adaccount with /act_<ACT_ID/stats I get a normal response with the stats back if I query the other account i get: (#273) This Ads API call requires the user to be admin of the ad account. User <MY_USER_ID> not admin on ad account <ACT_ID> .", I can see both Adaccounts normal in the Facebook Adsmanager. What I have done to

Facebook Marketing API Rate Limit

倖福魔咒の 提交于 2019-12-05 08:05:13
I know that fb have made available some documentation about the requests limits to the api https://developers.facebook.com/docs/marketing-api/api-rate-limiting , but it is not clear how each api call is calculated... i.e, If I want to get stats for ~10,000 adsets, how can I evenly space the time between the calls ? Nithya Sivakumar The best answer i could find for this question from another SO thread - "After some testing and discussion with the Facebook platform team, there is no official limit I'm aware of or can find in the documentation. However, I've found 600 calls per 600 seconds, per