简体   繁体   中英

Facebook authentication needed in my web applicication in order to use Graph API?

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..

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

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 eg 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM