Skip to content

Commit

Permalink
add weixin oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
xjflyttp committed Jan 19, 2015
1 parent de63ebb commit 1c7b31c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ components configure
'class' => 'xj\oauth\SinaAuth',
'clientId' => '111',
'clientSecret' => '111',
]
],
'weixin' => [
'class' => 'xj\oauth\WeixinAuth',
'clientId' => '111',
'clientSecret' => '111',
],
]
]
...
Expand Down Expand Up @@ -57,7 +62,7 @@ class SiteController extends Controller
* @see http://stuff.cebe.cc/yii2docs/yii-authclient-authaction.html
*/
public function successCallback($client) {
$id = $client->getId(); // qq | sina
$id = $client->getId(); // qq | sina | weixin
$attributes = $client->getUserAttributes(); // basic info
$userInfo = $client->getUserInfo(); // user extend info
var_dump($id, $attributes, $userInfo);
Expand Down

0 comments on commit 1c7b31c

Please sign in to comment.