anhskohbo / accountkit

Facebook Account Kit SDK for PHP

Home Page:https://packagist.org/packages/anhskohbo/accountkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Account Kit SDK for PHP

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());

Contribute

https://github.com/anhskohbo/accountkit/pulls

About

Facebook Account Kit SDK for PHP

https://packagist.org/packages/anhskohbo/accountkit

License:MIT License


Languages

Language:PHP 100.0%