# Facebook Lead Ads Plugin

**URL:** https://forum.mautic.org/t/facebook-lead-ads-plugin/9342
**Category:** 3rd Party Addons
**Created:** [August 31, 2017, 9:23am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342 "2017-08-31T09:23:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Luisfm](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Luisfm](https://forum.mautic.org/u/Luisfm)
#### Post date: [August 31, 2017, 9:23am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/1 "2017-08-31T09:23:59Z")

</div>

Hi guys  
  
I found [this plug-in](https://github.com/rmuilwijk/MauticFBAdsLeadAdsBundle) that pushes Facebook Lead Ads to Mautic on git.  
  
(i’m not the author)  
  
  
  
I’ve been trying to install it and every thing goes ok until the step 8 (of the install instructions) that is when I’ve to authorize the app.  
  
When I click the button it opens a pop-up but instead of open the page to authorize the app on Facebook opens a offline page with the mautic:

Code:

"The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator." System administrators, check server logs for errors."

  
Well i've checked server logs and here's the results:

Code:

[2017-08-31 10:20:16] mautic.ERROR: SymfonyComponentDebugExceptionFatalThrowableError: Class 'FacebookAdsApi' not found - in file /home/bo001/public\_html/emkt/plugins/MauticFBAdsLeadAdsBundle/Integration/FBAdsLeadAdsIntegration.php - at line 132 [] []

  
Can anyone help me fixe this?

---

<div class="post-metadata">

### Author: ![Luisfm](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Luisfm](https://forum.mautic.org/u/Luisfm)
#### Post date: [August 31, 2017, 9:23am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/2 "2017-08-31T09:23:59Z")

</div>

Hi guys  
I found [this plug-in](https://github.com/rmuilwijk/MauticFBAdsLeadAdsBundle) that pushes Facebook Lead Ads to Mautic on git.  
(i’m not the author)

I’ve been trying to install it and every thing goes ok until the step 8 (of the install instructions) that is when I’ve to authorize the app.  
When I click the button it opens a pop-up but instead of open the page to authorize the app on Facebook opens a offline page with the mautic:

`"The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator."
System administrators, check server logs for errors."`

Well i’ve checked server logs and here’s the results:

```auto
[2017-08-31 10:20:16] mautic.ERROR: SymfonyComponentDebugExceptionFatalThrowableError: Class 'FacebookAdsApi' not found - in file /home/bo001/public_html/emkt/plugins/MauticFBAdsLeadAdsBundle/Integration/FBAdsLeadAdsIntegration.php - at line 132 [] []
```

Can anyone help me fixe this?

---

<div class="post-metadata">

### Author: ![petertl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/petertl/32/511_2.png) [@petertl](https://forum.mautic.org/u/petertl)
#### Post date: [August 31, 2017, 9:28am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/3 "2017-08-31T09:28:29Z")

</div>

Looks like the Facebook marketing API was not installed properly. Although I don’t know how to check the “properly” - can you confirm that the API is installed?

---

<div class="post-metadata">

### Author: ![Luisfm](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Luisfm](https://forum.mautic.org/u/Luisfm)
#### Post date: [August 31, 2017, 9:37am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/4 "2017-08-31T09:37:36Z")

</div>

By Facebook marketing API you are referring to the step1?

> [@](#):
>
> Require the FB ads library in the Mautic root directory composer require facebook/php-ads-sdk:2.9.\*

If so, i don’t know how to check the if its properly installed 😑

- I downloaded it from [here](https://github.com/facebook/facebook-php-ads-sdk/releases)
- Extracted it MauticFolder/ facebook/php-ads-sdk:2.9.\*

and thats it :

---

<div class="post-metadata">

### Author: ![Wompoo](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@Wompoo](https://forum.mautic.org/u/Wompoo)
#### Post date: [September 22, 2017, 9:03pm UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/5 "2017-09-22T21:03:32Z")

</div>

I dont know if this query is still live …

There is a README.md file in the “facebook-php-ads-sdk” zip file that describes the need to install the package by adding a “require” line to the composer.json file and running the install routine.  
It doesn’t look like it is simply a matter of extract and hope for the best.

I have need for a FB interface to mautic so I will give it a crack and see how I go.

I’ll report back any progress.

Luke

---

<div class="post-metadata">

### Author: ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)
#### Post date: [September 22, 2017, 9:14pm UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/6 "2017-09-22T21:14:02Z")

</div>

That is NOT an Official Mautic plugin so i hard to tell if works with the new Mautic version.

---

<div class="post-metadata">

### Author: ![Wompoo](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@Wompoo](https://forum.mautic.org/u/Wompoo)
#### Post date: [September 23, 2017, 5:32am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/7 "2017-09-23T05:32:06Z")

</div>

[quote=25432:@Luisfm]I downloaded it from here  
Extracted it MauticFolder/ facebook/php-ads-sdk:2.9.\*[/quote]

Ok, I did the following and it seemed to install the FB sdk ok.

1. Created a folder in Mautic called facebook
2. Created a folder in facebook called “php-ads-sdk-2.10.1” (without the quote marks)
3. from the command line in the mautic directory run the command:  
composer require --ignore-platform-reqs facebook/php-ads-sdk:2.10.1  
If all goes well you should see some output that shows it is loading composer repositories, upda  
ting dependencies, writing lock files and generating autoload files.

So, that was easy enough … now I gotta figure out what the rest of the README.md means!

---

<div class="post-metadata">

### Author: ![Luisfm](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Luisfm](https://forum.mautic.org/u/Luisfm)
#### Post date: [October 7, 2017, 9:43am UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/8 "2017-10-07T09:43:08Z")

</div>

[quote=26081:@Wompoo]There is a README.md file in the “facebook-php-ads-sdk” zip file that describes the need to install the package by adding a “require” line to the composer.json file and running the install routine.  
It doesn’t look like it is simply a matter of extract and hope for the best.[/quote]

That’s what I thought, but I thought it was worth trying.  
before simply copying I tried to do this:

[quote=26101:@Wompoo]Created a folder in Mautic called facebook  
Created a folder in facebook called “php-ads-sdk-2.10.1” (without the quote marks)  
from the command line in the mautic directory run the command:[/quote]

and the maltic stopped working ☹  
I’ll try again, and see what the result is.

---

<div class="post-metadata">

### Author: ![Luisfm](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Luisfm](https://forum.mautic.org/u/Luisfm)
#### Post date: [October 8, 2017, 6:56pm UTC](https://forum.mautic.org/t/facebook-lead-ads-plugin/9342/9 "2017-10-08T18:56:21Z")

</div>

Here’s the result after install composer and run `composer require --ignore-platform-reqs facebook/php-ads-sdk:2.10.1
`

![](https://i.imgur.com/inrMfF1.png)
