anhskohbo / accountkit
Facebook Account Kit SDK for PHP
Installs: 264
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/anhskohbo/accountkit
Requires
- php: >=5.6
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ~4.0|~5.0
This package is auto-updated.
Last update: 2019-09-23 07:18:40 UTC
README
Install
composer require anhskohbo/accountkit
Usage
Follow the instruction from: https://developers.facebook.com/docs/accountkit/webjs
Example "server.php"
<?php require 'vendor/autoload.php'; use Anhskohbo\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());