views:

20

answers:

1

Hey!

So i just got devise and fb login to work on my rails project, but I would like to get more info about the user when they log in. I added user_about_me to the scope of the request and that got me a lot of info, but I would also like to get the users music/movies/etc. I tried adding user_interests but it doesnt seem to send anything different than before. Any ideas?

Here is my devise.rb section for facebook

  config.oauth :facebook, '???????', '??????????????',
           :site => 'https://graph.facebook.com/',
           :authorize_path => '/oauth/authorize',
           :access_token_path => '/oauth/access_token',
           :scope => %w(email user_interests user_about_me)

When I print the data it returns there is no sign of users interests. Any ideas?

Thanks!

+2  A: 

I am guessing you are just requesting the users basic information such as https://graph.facebook.com/user_id?access_token=... If you want to get their interests it is a separate API call. https://graph.facebook.com/user_id/interests?access_token=...

You can see all the different requests you can make on a user here: http://developers.facebook.com/docs/reference/api/user

Nathan Totten
but do you have any idea how to do that with the devise plugin? It seems like I can only get info during the login process
Daniel Hertz
got it! I just needed to save the access_token on sign in to make other calls later possible. thanks!
Daniel Hertz