hadesker/social-api

Login or register via Social API.

v1.4 2019-04-21 15:26 UTC

This package is auto-updated.

Last update: 2024-11-08 14:06:21 UTC


README

Latest Version Build Status Total Downloads

Curl User Info from Social. Support: facebook, google, zalo, naver, kakao (via access token)

Install: composer require hadesker/social-api

$accessToken = '....';
$provider = 'facebook'; // supported providers: facebook, google, zalo, naver, kakao

$loginSocialApi = new \Hadesker\SocialApi\Handle($provider, $accessToken);
$user = $loginSocialApi->getUser();
if ($user) {
    $user->getId();
    $user->getName();
    $user->getPhone();
    $user->getEmail();
    $user->getGender();
    $user->getBirthday();
    $user->getAvatar();
    var_dump($user);
    die;
}
echo 'Access token invalid';

Auth: http://hadesker.net