rmuilwijk / MauticFBAdsLeadAdsBundle

Enables synchnronization of Facebook Lead Ads as leads into Mautic.
GNU General Public License v3.0
51 stars 18 forks source link

Stuck in step 1 :( #8

Open Carlos-mb opened 6 years ago

Carlos-mb commented 6 years ago

I'm turning crazy trying to understand this:

"Require the FB ads library in the Mautic root directory composer require facebook/php-ads-sdk:2.9.*"

Where can I find Fb Ads Library. I have searched in google and github but I haven't found a confidence result.

Thanks!

Carlos-mb commented 6 years ago

I'll try with

https://github.com/facebook/facebook-php-business-sdk

Carlos-mb commented 6 years ago

In step 7 plugin requires "Your custom Facebook Verify token of the webhook" but I don't have it,

LeSoul commented 5 years ago

I'm turning crazy trying to understand this:

"Require the FB ads library in the Mautic root directory composer require facebook/php-ads-sdk:2.9.*"

Where can I find Fb Ads Library. I have searched in google and github but I haven't found a confidence result.

Thanks!

Carlos, did you have any answer about your questions? I have the same doubts than you...

Carlos-mb commented 5 years ago

@LeSoul

I guess this sotware is not working with the new FB API

LeSoul commented 5 years ago

Ok, thank you!

fcandiani commented 5 years ago

Hello guys, I'm trying to install it as well. These are the steps I followed for the installation

1 - ssh to machine

2 - since I downloaded the zip file from the website I didn't have the composer.json in my root folder

3 - downloaded the composer.json from master in github into mautic's root folder

4 - installed composer php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"; php composer-setup.php; php -r "unlink('composer-setup.php');"; mv composer.phar /usr/local/bin/composer;

5 - downloaded all the libs and facebook ads sdk (you might have other dependencies here that you have to install, it depends on your server) composer update; composer require facebook/php-ads-sdk:2.9.*;

6 - Downloaded Plugin cd plugins; wget https://github.com/rmuilwijk/MauticFBAdsLeadAdsBundle/archive/master.zip; unzip master.zip; rm master.zip; mv MauticFBAdsLeadAdsBundle-master MauticFBAdsLeadAdsBundle;

7 - Ensure everything was accessible (might not be nedded) chown www-data:www-data mautic_path -R;

8 - Clear cache php app/console cache:clear --env=prod

The plugin is running, normally.

But after the facebook app configuration and connection step to authorize the app I get an error due to wrong version

mautic.CRITICAL: Uncaught PHP Exception FacebookAds\Http\Exception\AuthorizationException: "(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v3.1." at /var/www/mautic_mesterlab/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php line 140 {"exception":"[object] (FacebookAds\\Http\\Exception\\AuthorizationException(code: 2635): (#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v3.1. at /var/www/mautic_mesterlab/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php:140)"} []

will try to update and see if I get it working

dsp76 commented 5 years ago

@fcandiani did you get it to work?

fcandiani commented 5 years ago

@dsp76 Yes, I just had to change the composer dependency to 3.1.*;

composer require facebook/php-ads-sdk:3.1.*;

Also, I installed mautic using git instead the "ready package" (all composer deps installed) they provide.

dsp76 commented 5 years ago

When I installed via composer, it broke my mautic installation.

fcandiani commented 5 years ago

Can you provide more details? I could help you

dsp76 commented 5 years ago

@fcandiani tried to find you either in Mautic Slack (https://www.mautic.org/slack/) or in Skype to discuss it. Maybe we can switch there?

currently "composer require facebook/php-ads-sdk:3.1.*;" will delete all other vendor bundles from Mautic... if that was setup "traditionally" without composer.

Be careful, if you use composer in the case Mautic wasn't installed the same way before.

jhavenz commented 4 years ago

As dsp76 mentioned, the first command command "composer require facebook ..." breaks the Mautic installation when the server is running the "production" version. Is there a way to bring it back to life after running this command? Unfortunately, I didn't see dsp's comment until after I had already tried. I'm now getting the "white screen of death" when I try to visit the url in browser. Also, when I try to run php app/console, there's a "Fatal Error" saying that the "Class App\MauticBundles\MauticApiBundle" cannot be found".. I'm assuming this is because composer is only looking in the root directory for Mautic's classes now, after running this command.

If no fix for this, shouldn't this be a big WARNING at the very top of this bundles' instructions??

stremshs commented 4 years ago

Here is how I made it to work :

INSTALL COMPOSER

INSTALL Facebook Ads SDK

INSTALL Mautic plugin

I followed @fcandiani method :

Configure Facebook

This is getting complicated as Facebook asks for many things to verify the app.... So I can't Authorize my app for now (app is being validated, but I can't provide them with all the requirements... Wait & see ! )

Hope that helps.