Skip to content

Commit

Permalink
Update doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Dec 4, 2015
1 parent 98da239 commit a4ecdd9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ echo $response;// or $response->send();
<?php

// ...
$user = $socialite->driver('weibo')->user();
$user = $socialite->driver('google')->user();

var_dump($user);
// 'id' => int 2193182644
// 'nickname' => null
// 'name' => string '安正超' (length=9)
// 'email' => null
// 'avatar' => string 'http://tp1.sinaimg.cn/2193182644/180/40068307042/1' (length=50)
$user->getId(); // 1472352
$user->getNickname(); // "overtrue"
$user->getName(); // "安正超"
$user->getEmail(); // "[email protected]"
...
```

### Scope
Expand Down Expand Up @@ -137,13 +136,13 @@ $user->getToken();

#### Get original response from OAuth API

the `$user->getOriginal()` method will return the API raw response array.
The `$user->getOriginal()` method will return an array of the API raw response.

#### Get access token Object

You can get the access token instance of current session by call `$user->getToken` or `$user->getAccessToken()` or `$user['token']` .

Enjoy it!
Enjoy it! :heart:

# Reference

Expand Down

0 comments on commit a4ecdd9

Please sign in to comment.