lundi 23 mai 2016

Facebook SDK v5 integration with Laravel 5.0

I'm trying to make a guide on how to integrate Facebook SDK v5 with Laravel 5.0. Have anyone done this before?

First of all i added "facebook/php-sdk-v4" : "~5.0" in composer.json see documentatione here: http://ift.tt/1gmI4Iq

{
  "require" : {
    "facebook/php-sdk-v4" : "~5.0"
  }
}

Next step composer install in CMD

composer install

Next i added a route:

Route::get('/test', 'Facebookintegration@test');

Next i returned a view:

public function test() {

    return view('testpage');

}

Next i try to run the info in the view testpage

<?php

require_once URL::asset('vendor/autoload.php');

$fb = new Facebook\Facebook([
'app_id' => 'YOUR_APP_ID',
'app_secret' => 'YOUR_APP_SECRET',
'default_graph_version' => 'v2.5',
]);

?>

Here is where the problems start and this is my current error

main(): Failed opening required 'http://localhost/fbintegration/vendor/autoload.php' (include_path='.;C:\php\pear')

anyone know how to correctly link yo the files?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/25hdueU
via IFTTT

Aucun commentaire:

Enregistrer un commentaire