diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-14 06:07:40 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-14 06:07:40 -0400 |
commit | 516baa45311a515f81a8ba19e3bf2e75e107b07f (patch) | |
tree | 510316ae8404be8dbadf5d20d05d7bb3d9f8475e | |
parent | a1ab3cad3ea25f561f81c41e0c9e562408ef5c96 (diff) |
Weibo oauth
-rw-r--r-- | modules/social/social.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/social/social.go b/modules/social/social.go index afcafd48..ac63b615 100644 --- a/modules/social/social.go +++ b/modules/social/social.go @@ -371,7 +371,7 @@ func (s *SocialWeibo) SetRedirectUrl(url string) { func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, error) { transport := &oauth.Transport{Token: token} var data struct { - Id string `json:"id"` + Id int64 `json:"id"` Name string `json:"name"` } var err error @@ -390,7 +390,7 @@ func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, return nil, err } return &BasicUserInfo{ - Identity: data.Id, + Identity: base.StrTo(data.Id).String(), Name: data.Name, }, nil return nil, nil |