Login via social app


#1

Hi All,
i want to implementing login via Facebook, but getting error file not find .

file: facebook/lib/Facebook.php
type: addons
attempted_locations:
0: /var/www/html/test/frontend/vendor/facebook/lib/Facebook.php
1: /var/www/html/test/frontend/…/addons/facebook/lib/Facebook.php
2: /var/www/html/test/frontend/…/shared/facebook/lib/Facebook.php
3: /var/www/html/test/frontend/…/vendor/facebook/lib/Facebook.php
4: /var/www/html/test/shared/addons/facebook/lib/Facebook.php
5: /var/www/html/test/frontend/…/atk4-addons/facebook/lib/Facebook.php
6: /var/www/html/test/frontend/…/shared/addons2/facebook/lib/Facebook.php
7: /var/www/html/test/frontend/…/addons/facebook/lib/Facebook.php
8: /var/www/html/test/frontend/…/vendor/facebook/lib/Facebook.php
9: /var/www/html/test/frontend/…/vendor/atk4/facebook/lib/Facebook.php

class: Facebooknamespace: facebook
orig_class: facebook\Facebook


i installed the facebook sdk version via composer
{
“require” : {
“facebook/php-sdk-v4” : “~5.0”
}
}

i am using this code

use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\FacebookRedirectLoginHelper;
use Facebook\GraphUser;

$fb = new facebook\Facebook([
‘app_id’ => $config[‘Facebook’][‘app_id’],
‘app_secret’ => $config[‘Facebook’][‘app_secret’],
‘default_graph_version’ => ‘v2.3’
]);

i already installed so many other php library via composer but getting this type of error first time.
may be problem occur due to path finder ?

Guy’s please guide me.

Thanks.


#2

Normally as long as you include ‘vendor/autoload.php’ inside your index.php file, it should be able to locate the necessary files.

Agile Toolkit has its own loader but it shouldn’t conflict with the composer.