get user profile large picture from facebook with omniauth in devise 2.0

facebook, facebook-graph-api, omniauth, ruby-on-rails, ruby-on-rails-3

Solution

Below are the 4 Different Size of profile pictures that is allowed by facebook.

http://graph.facebook.com/id/picture?type=small
http://graph.facebook.com/id/picture?type=square
http://graph.facebook.com/id/picture?type=large
http://graph.facebook.com/id/picture?type=normal

Problem

I want get the user profile large or normal picture from facebook. Now I get the square version from user profile picture with this code: ``` :image => access_token.info.image # http://graph.facebook.com/id/picture?type=square ``` How can I get the large or normal versions? Or and the app, How can I replace in this url the last word, large instead square... Thank you very much!

Original source