Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does OmniAuth provide simple hooks to the Facebook Graph API?

I am working on integrating Omniauth with my new Facebook application, and I am looking through the rather sparse documentation to understand if it gives simple ways to access the graph API... I am moving from Koala which was pretty simple.

Has anyone out there used Omniauth for this yet? I want to get photos from the users' albums, and sort and get the unique URLs for them.

like image 741
Richard Jordan Avatar asked Oct 24 '10 22:10

Richard Jordan


1 Answers

I finally found out:

1) include this gem

2) use the gem:

user = FbGraph::User.new('me', :access_token => session[:omniauth]["credentials"]["token"])

user.fetch

3) retrieve your information user.name

Remember you can get anything from here ttp://developers.facebook.com/docs/reference/api/user

like image 177
apneadiving Avatar answered Sep 28 '22 00:09

apneadiving