diff --git a/README.md b/README.md index 44ceac6..eedc6e7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The library requires PHP 5.3+ and is PSR-0 compatible. ## Usage ```php -$provider = new \OAuth2\Client\Provider\(array( +$provider = new League\OAuth2\Client\Provider\(array( 'clientId' => 'XXXXXXXX', 'clientSecret' => 'XXXXXXXX', 'redirectUri' => 'http://your-registered-redirect-uri/' @@ -61,5 +61,6 @@ if ( ! isset($_GET['code'])) { | **Facebook** | string | string | string | string | string | string | string | string | string | array (Facebook) | | **Github** | string | string | string | null | null | string | null | null | null | array (Github, [personal])| | **Google** | string | string | string | string | string | string | null | null | string | null | +| **Instagram** | string | string | string | null | null | null | null | string | string | null | -**Notes**: Providers which return URLs sometimes include additional URLs if the user has provided them. These have been wrapped in [] \ No newline at end of file +**Notes**: Providers which return URLs sometimes include additional URLs if the user has provided them. These have been wrapped in [] diff --git a/src/League/OAuth2/Client/Provider/Instagram.php b/src/League/OAuth2/Client/Provider/Instagram.php new file mode 100644 index 0000000..6a5d578 --- /dev/null +++ b/src/League/OAuth2/Client/Provider/Instagram.php @@ -0,0 +1,38 @@ +uid = $response->data->id; + $user->nickname = $response->data->username; + $user->name = $response->data->full_name; + $user->description = isset($response->data->bio) ? $response->data->bio : null; + $user->imageUrl = $response->data->profile_picture; + + return $user; + } +}