Questions tagged [facebook-business-sdk]
67 questions
1
vote
0 answers
facebook-php-business-sdk getting PHP Fatal error: Uncaught FacebookAds\Http\Exception\AuthorizationException: Invalid parameter in targeting
PHP Fatal error: Uncaught FacebookAds\Http\Exception\AuthorizationException: Invalid parameter in C:\xampp8.0\htdocs\facebook-php-business-sdk\src\FacebookAds\Http\Exception\RequestException.php:174
Stack trace:
$params = array(
'name' => 'My…

paras dev
- 11
- 1
1
vote
1 answer
Facebook Business SDK for PHP - Failed sending HTTP request: Header overflow
I am trying to gather a year's worth of data for a select ad account but I get the following exception:
FacebookAds\Exception\Exception
Failed sending HTTP request: Header overflow
The exception happens at the following line of code:
$adData =…

jackthedev
- 417
- 8
- 21
1
vote
0 answers
How can I get insight of each level (campaign,adset,ad) in a Facebook ad campaign in single query?
I had created a method to retrieve insight data for each level of the campaign. But the problem is that I use loop to gain insight into each entity, causing my Ad Account-Level Rate Limit to reach its maximum. Is it possible to do all this in a…

Ash18
- 299
- 3
- 12
1
vote
1 answer
(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version
so there have been a bunch of similar questions, though I haven't managed to find the answer in any of them, so here we are. I'm trying to pull some data from the Facebook API using Python, and at here's the error I'm…

H8oddo
- 123
- 9
1
vote
1 answer
How to catch *specific* exceptions in Facebook Business Python SDK?
a very simple question, but nonetheless there doesn't appear to be any info on it.
I want to wrap a call to Facebook's Marketing API in a try-except statement. As is good practice (I hear), I want to catch specific exceptions, rather than…

nikUoM
- 639
- 1
- 8
- 18
1
vote
1 answer
Facebook Marketing API Ads Insights to CSV in Python
How to export the response of Facebook Marketing API Ads insights to CSV.
Below are my code and the response from it.
from facebook_business.api import FacebookAdsApi
from facebook_business.adobjects.adaccount import AdAccount
app_id =…

gm-123
- 248
- 3
- 16
1
vote
1 answer
Facebook Business SDK for Python. Is there a way to make async batch calls from this library?
I've been looking for a way to make async batch calls from facebook library in the github repository README file and the documentation provided by facebook. The problem I'm having is that I want to create a copy of an adset. The appropiate call to…

Estuardo Estrada
- 86
- 6
1
vote
1 answer
Facebook Business SDK PHP - Cannot Fetch Campaign Fields
I am trying to get the campaign names of an ad account with the following code
$account = new AdAccount($account_id);
$cursor = $account->getCampaigns();
echo sizeof($cursor);
// Loop over objects
foreach ($cursor as $campaign) {
echo…

Eleni Ioakim
- 13
- 3
1
vote
0 answers
Facebook: migrate an app from one Business Manager to another
Is it possible to migrate an app from a business manager to another?
We develop an app that required business verification and we associate it with a sandbox business manager, instead of the real one.
Now we want to correct this error and associate…

DiClem
- 336
- 2
- 8
1
vote
1 answer
Facebook Business Manager System User Error
Every time I try to generate a system user access token I get
An unexpected error has occurred. Please retry your request later.
I have tried with existing apps and a new app altogether.
I am just trying to get it for adding to AdMob, it's so…

Dan Taylor
- 92
- 7
1
vote
1 answer
How to return all Campaign information for a specific user by calling the Facebook market API using the Facebook-business-php-sdk
I'm trying to get all campaign IDs using the supplied code from the API graph explore tool but the code supplied by the Graph API tool returns and error.
The Facebook initialization code is below
$api = new \Facebook\Facebook([
'app_id'…

Charles Bilbo
- 21
- 4
1
vote
1 answer
How to get the insights per campaign for multiple campaigns that belong to a specific ad account in a single call
We want to get the insights per campaign for multiple campaigns that belong to a specific ad account in a single call.
I am using the following http call and it returns me the correct insights(reach, impressions and clicks) and other data per…

giorgos constantinou
- 11
- 2
1
vote
1 answer
Cannot create Ad Set using Facebook Business SDK
We are using Laravel 5.7, PHP 7.1 and XAMPP 3.2.2
We want to create Facebook Campaigns using the PHP Business SDK and Marketing API.
The campaign is created successfully through the following source code
/* Start Campaign*/
$fields =…

Giorgos Constatninou
- 11
- 3
0
votes
0 answers
FB: System user access token don't have scope delegated from configuration from FB login for Business flow
Steps I followed:
Create app
Add FB login for Business product in your app
Create config with permission & asset I selected - Adaccount, Page, Pixel
Javascript SDK
window.FB.login(
(response) => {
if (response && response.authResponse &&…

Chirag MALI
- 17
- 3
0
votes
0 answers
How to add send Digital Catalogues(example shown in the image below) via Whatsapp Business API?
I'm trying to build a Food Order taking bot in WhatsApp. However I do not see an option to create a message template for publishing food menus as shown in the image below.

Krish
- 51
- 6