PHP code example of tayokin / laravel-facebook-accountkit

1. Go to this page and download the library: Download tayokin/laravel-facebook-accountkit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tayokin / laravel-facebook-accountkit example snippets


'providers' => [
    ...
    Tayokin\FacebookAccountKit\FacebookAccountKitServiceProvider::class,
],

'aliases' => [
    ...
    'AccountKit' => Tayokin\FacebookAccountKit\Facades\FacebookAccountKitFacade::class,
],

Route::get('/<path/to/endpoint>', 'FacebookAccountKitController@endpoint');

use Tayokin\FacebookAccountKit\Facades\FacebookAccountKitFacade;
use Illuminate\Http\Request;

class FacebookAccountKitController extends Controller
{
    ...
    public function endpoint(Request $request)
    {
        $accountData = FacebookAccountKitFacade::getAccountDataByCode($request->get('code'));
        ...
    }
}

[▼
  "id" => "1802782826673865"
  "phoneNumber" => "+38093XXXXXXX",
  "email" => ""
]
bash
$ php artisan vendor:publish