facebook-marketing-api

Application does not have permission error when trying to add user to facebook ad account

纵饮孤独 提交于 2019-12-12 04:32:28
问题 I have facebook business account. I am seeing following error. (#10) Application does not have permission for this action When trying to add user to ad account using following code. $attachment = array('access_token' => $accessToken, 'uid' => $fb_user_id, 'role' => '1001'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'https://graph.facebook.com/v2.8/act_'.$ad_account_id.'/users'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch

Retrieve Facebook Insights for all active ads within an account?

我只是一个虾纸丫 提交于 2019-12-12 03:56:00
问题 My code allows me to retrieve all ads that between certain dates, but this includes ads that are no longer active. I want to show insights only for ACTIVE ads. How can I retrieve Facebook Insights for all active ads within an account? public function getInsights($levelType, $id, $aggLevel, $start, $end) { if ($levelType) { if ($id == null) { abort(400, 'You must provide the ID for the object you want to retrieve.'); } } else { $levelType = \AdAccount::class; $id = ACT_PREPEND . $this-

Create Facebook Custom Audience for website Traffic

这一生的挚爱 提交于 2019-12-11 11:52:28
问题 I'm trying to create custom audience for web-traffic using the marketing API (Facebook Ads SDK 2.5). This is what I tried. $audience = new CustomAudience(null, 'act_'.$account_id); $aud_data = array( CustomAudienceFields::NAME => $name, CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::CUSTOM, CustomAudienceFields::RULE => array('event' => array('i_contains' => 'ViewContent','i_contains' => $name ) ), CustomAudienceFields::PIXEL_ID => $pixelId, CustomAUdienceFields::DESCRIPTION => '',

Facebook Adgen The page admin who installs the app has ceased being an admin

痴心易碎 提交于 2019-12-11 06:45:24
问题 In the leadgen testing tool I keep getting this below error . The page admin who installs the app has ceased being an admin I am not understanding what is the next step here. can some one please help ? Subscribed Field - leadgen Status - failure Error Code - 100 Reason - The page admin who installs the app has ceased being an admin 来源: https://stackoverflow.com/questions/54481419/facebook-adgen-the-page-admin-who-installs-the-app-has-ceased-being-an-admin

Facebook Marketing API Ads Insights

ぐ巨炮叔叔 提交于 2019-12-11 05:05:35
问题 I'm currently trying to access, through my marketing app, all the insights of my ads/campaings/ads account (clicks,impressions,etc). The tokens I generate has permissions for ads_management , ads_read , read_insights and manage_pages . Nevertheless, I always get this answer: {"data":[],"paging":{"cursors":{"before":"MAZDZD","after":"LTEZD"}}} (I get that response after I post something like curl -G \ -d "fields=impressions" \ -d "access_token=my_access_token" \ "https://graph.facebook.com/v2

time range filter on ads endpoint (Facebook API)

ぐ巨炮叔叔 提交于 2019-12-11 04:53:41
问题 We are trying to filter results of ads using date parameters on the /v2.7/{ad-account-id}/ads endpoint According to the docs, you can use a time_range parameter, but it doesn't seem to be working properly using the PHP SDK or the graph explorer, example: act_{1234456}/ads?time_range={'since':'2016-08-01','until':'2016-08-12'} The documentation is pretty unclear on this because there is 2 references to the same ads endpoint but each with different params https://developers.facebook.com/docs

Facebook Marketing API Get Campaigns per date

做~自己de王妃 提交于 2019-12-10 11:18:15
问题 I have created an application requesting from facebook's Marketing API, to return all my ad accounts, and from all my ad accounts all my ad campaigns, and from all my campaigns, get insights for a specific date(or date range). Now because my campaigns are too many and I can't make a request for every campaign in a account(even if I wanted the facebook's throttling mechanism kicks in) I am trying to find a way to get only the campaigns that were active or had data on my specific date(date

Request to promote iOS App in Facebook via Marketing API

我是研究僧i 提交于 2019-12-10 04:24:37
问题 I have the facebook application with approved ads_read, manage_pages ads_management, business_management and Ads Management Standard Access permissions . I can create Ad campaign , ad set and can upload asset to Facebook via Facebook Marketing API. I create ad set with such parameters: { name: 'adset_name', campaign_id: '<campaign_id>', lifetime_spend_cap: 11000, promoted_object: { application_id: '<fb_app_id>', object_store_url: 'https://itunes.apple.com/app/<my_app>', page_id: '<page_id>',

making complex queries using python and facebook marketing api (targeting)

房东的猫 提交于 2019-12-09 03:54:21
问题 i am trying to make complex queries in order to know things like "the is the size of population (audience size) of people who are interested in football and also live in new york". i have access token, and yet i can't make complex conditions, only 1 condition at a time. another problem is that i take the curl code and i conver it to python code using https://curl.trillworks.com/ so far i did this code: import requests data2 = [('type', 'adinterest'),('q','football'), ('access_token','my

Creating a Facebook ad creative from an app in development mode

偶尔善良 提交于 2019-12-08 20:21:12
问题 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