Question

Right now I am pulling facebook profile photo in my app using

 graph = Koala::Facebook::API.new
    profile_path = graph.get_picture("username",:type=>"large")
    @user.update_attributes(:profile_pic => profile_path)

And display it using

<%= image_tag  @user.profile_pic%>

It is showing up fine.

But what I would like to do is setup an OAuth, where in users can login and the app would retrieve the logged in user's username to parse in above. Since right now I am doing it manually, as you can see above.

It might be a silly a question. But for some reason, I am not able to figure out where to start in order to implement OAuth. That is how should the login page be setup ? And how should the call back be? I am bale to signup an app on Facebook. But dont know what to do next.

Any help is appreciated.

Thanks much.

Was it helpful?

Solution

maybe here is where you can start from

http://railscasts.com/episodes/360-facebook-authentication

railscast always good to seek for sources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top