0

I want my web application, which is built with Ruby on Rails, to communicate with the Facebook Social Graph API, but I am aware of that I need some kind of authorization to achieve that.

So, do I need to build OAuth authentication for my application to make use of auto-publishing messages on the user's Facebook wall? If not, how could I integrate the social features into my web application?

The web application already has an existing user base; could I also allow my application to get Facebook access? If yes, how?

I would appreciate examples of sites who do this kind of integration really well, also with other services like Twitter, LinkedIn, etc..

Kenny Meyer
  • 7,849
  • 6
  • 45
  • 66

2 Answers2

2

All is explained on the facebook developers site:

http://developers.facebook.com/

This explains the auth you need to access graph http://developers.facebook.com/docs/guides/web/#login

You can then combine graph info with your existing user database by saving their facebook ID number hence then you can pull up profile pics etc

Sam Palmer
  • 1,675
  • 1
  • 25
  • 45
  • so, it *is needed* to set-up Facebook log-in to use the Graph API, or is that just the most convenient way to do it? That's not obvious from your answer, thought it helped me a lot. – Kenny Meyer Jan 14 '12 at 13:47
  • 1
    you don't have to have a Facebook log-in, but your app needs to be authenticated by Facebook for it to access Graph, and the users then need to authorise your website. You can then request information from the GraphAPI – Sam Palmer Jan 14 '12 at 13:51
  • Thanks for the answer... this really was my biggest incognito. – Kenny Meyer Jan 14 '12 at 14:34
1

Try using the following gems:

  1. Devise: User authentication (If you already have the framework for user authentication, this will not be needed.
  2. Omniauth: Facebook (or any other OAauth e.g. Twitter) authentication
  3. Koala: Facebook open graph api

If you need only Facebook integration, Koala should be sufficient. For making them work together check this: Making OmniAuth, Devise and Koala work together

Community
  • 1
  • 1
Kumar Deepak
  • 473
  • 4
  • 18