Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
VERSION.json
oauth2.php
readme.textile

readme.textile


<?php
$oauth2 = new Oauth2(
    'client_id',
    'client_secret',
    array(
        'site' => 'https://graph.facebook.com',
        'authorize_path' => 'oauth/authorize',
        'access_token_path' => 'oauth/access_token',
    )
);

if (isset($_GET['code'])) {
    $accessToken = $oauth2->accessToken(
        $_GET['code'],
        array(
            'redirect_uri' => 'connect_url'
        )
    );
    $feed = $oauth2->get('me/feed');
} else {
    $loginUrl = $oauth2->authorizeUrl(
        array(
            'scope' => 'publish_stream',
            'redirect_uri' => 'connect_url'
        )
    );
}
?>

Something went wrong with that request. Please try again.