.
This commit is contained in:
@@ -167,7 +167,7 @@ func (p Provider) AuthHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] %+v", jData)
|
||||
log.Printf("[DEBUG] user info %+v", session.Values["uinfo"])
|
||||
|
||||
// redirect to back url if presented in login query params
|
||||
if fromURL, ok := session.Values["from"]; ok {
|
||||
|
||||
@@ -80,10 +80,10 @@ func NewFacebook(p Params) Provider {
|
||||
}
|
||||
userInfo.ID = "facebook_" + userInfo.ID
|
||||
|
||||
log.Printf("%T", data["picture"])
|
||||
// picture under picture[data[url]]
|
||||
if p, ok := data["picture"]; ok {
|
||||
if d, ok := p.(map[string]interface{}); ok {
|
||||
log.Printf("%+v", d)
|
||||
if picURL, ok := d["url"]; ok {
|
||||
userInfo.Picture = picURL.(string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user