nggiahao/facebook-graph

The Facebook Graph SDK for PHP

0.2.0 2020-11-14 17:16 UTC

This package is auto-updated.

Last update: 2024-09-22 20:31:06 UTC


README

Latest Version on Packagist Total Downloads

Installation

You can install the package via composer:

composer require nggiahao/facebook-graph

Usage

use Nggiahao\Facebook\Facebook;
use Nggiahao\Facebook\Model;

class UsageExample
{
    public function run()
    {
        $accessToken = 'xxx';

        $graph = new Facebook();
        $graph->setAccessToken($accessToken);

        $user = $graph->request("GET", "/me")
                      ->returnEmtry(Model\User::class) //or return Collection

        echo "Hello, I am $user->name ";
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email giahao9899@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.