Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck in step 1 :( #8

Open
Carlos-mb opened this issue Sep 14, 2018 · 13 comments
Open

Stuck in step 1 :( #8

Carlos-mb opened this issue Sep 14, 2018 · 13 comments

Comments

@Carlos-mb
Copy link

Carlos-mb commented Sep 14, 2018

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
Copy link
Author

@Carlos-mb
Copy link
Author

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

@LeSoul
Copy link

LeSoul commented Sep 27, 2018

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
Copy link
Author

@LeSoul

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

@LeSoul
Copy link

LeSoul commented Sep 27, 2018

Ok, thank you!

@fcandiani
Copy link

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
Copy link

dsp76 commented Feb 27, 2019

@fcandiani did you get it to work?

@fcandiani
Copy link

@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
Copy link

dsp76 commented Mar 1, 2019

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

@fcandiani
Copy link

Can you provide more details?
I could help you

@dsp76
Copy link

dsp76 commented Mar 11, 2019

@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
Copy link

jhavenz commented Nov 24, 2019

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
Copy link

Here is how I made it to work :

INSTALL COMPOSER

  • curl -sS https://getcomposer.org/installer | /usr/bin/php7.1-cli

INSTALL Facebook Ads SDK

  • Go to Mautic install directory
  • rename the ./vendor/ directory to vendorBAK
  • install the lib : /usr/bin/php7.1-cli ~/composer/composer.phar require facebook/php-ads-sdk:2.9.*
    This command ran into a "Fatal error: Out of memory" so I had to run it with the "--prefer-dist" option
  • copy the ./vendor/facebook/ directory into the ./vendorBAK/
  • open the ./vendor/composer/installed.json file, and get the code corresponding to the facebook library (between {} : DO NOT take the brackets)
  • copy these lines into the ./vendorBAK/composer/installed.json file
  • rename ./vendor to ./vendorFB, and ./vendorBAK to ./vendor

INSTALL Mautic plugin

I followed @fcandiani method :

  • cd plugins; wget https://github.com/rmuilwijk/MauticFBAdsLeadAdsBundle/archive/master.zip; unzip master.zip; rm master.zip; mv MauticFBAdsLeadAdsBundle-master MauticFBAdsLeadAdsBundle;
  • clear cache : php app/console cache:clear --env=prod
  • Go onto Mautic's Plugins page and click the "Install/update plugins" button !
  • Plugin should appear next to Facebook plugin.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants