I'm working on rails 4, with the Koala gem to retrieve users pictures from Graph API.
I can receive the gem to receive the pictures:
picture, picture_medium, picture_small = graph.batch do |batch_api|
batch_api.get_picture(facebook_id, {'width' => PIC_SIZE_LARGE, 'height' => PIC_SIZE_LARGE}, 'return_ssl_resources' => '0')
batch_api.get_picture(facebook_id, {'width' => PIC_SIZE_MED, 'height' => PIC_SIZE_MED}, 'return_ssl_resources' => '0')
batch_api.get_picture(facebook_id, {'width' => PIC_SIZE_SMALL, 'height' => PIC_SIZE_SMALL}, 'return_ssl_resources' => '0')
end
but I would like to save the url the Koala is using (I preffer the user will call the url, instead of me). I assumes that the gem calls: https://graph.facebook.com/facebook_id/picture
but I don't want it to be hard-coded. Is there a way extracting the url from the gem? thanks
Change this
to this
And then the pics in your views without saving them to the db