PHP code example of anhskohbo / accountkit

1. Go to this page and download the library: Download anhskohbo/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/ */

    

anhskohbo / accountkit example snippets




nhskohbo\AccountKit\Config;
use Anhskohbo\AccountKit\Client;

$facebookAppID = "<facebook_app_id>";
$accountKitAppSecret = "<account_kit_api_version>";

$client = new Client(new Config($facebookAppID, $accountKitAppSecret));

$token = $client->getAccessToken($_POST['code']);
$user = $client->getUser($token);

var_dump($user);
var_dump($user->getPhoneNumber());