Skip to content

Conversation

@kefahi
Copy link

@kefahi kefahi commented Sep 27, 2020

FBUser.picture_url is not filled by the FB api nor is it used. A minor modification was required to retrieve the picture and gender as well.

user.location = fb_user.location
user.description = fb_user.about
user.image = fb_user.picture[:data][:url]
user.gender = fb_user.gender if fb_user.gender
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO user.gender = fb_user.gender should work, no needs for if

user.last_name = fb_user.last_name
user.location = fb_user.location
user.description = fb_user.about
user.image = fb_user.picture[:data][:url]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code will raise an exception if fb_user.picture is nil, right? could we avoid it?


property raw_json : String?
property access_token : OAuth2::AccessToken?
property picture_url : String?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let remove it, if it not used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants