Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate facebook comments in Rails application?

I've set up a Rails 3.2 application with Devise. I was wondering how I can allow users to comment using Facebook. Can I use facebook connect along with Devise? If I can, is it ok to have 2 methods of authentication on my site?

I've read some tutorials on setting up OAuth with Devise to allow facebook connect, but it's not all that clear to me. Does anyone know a good step-by-step tutorial on how to integrate facebook comments with Devise already set up? Thanks a lot!

like image 759
gerky Avatar asked Aug 21 '12 06:08

gerky


1 Answers

You don't need to setup Facebook Connect for comments.

You have to first create a Facebook app, then generate the comments plugin. After, put the Javascript code in your application.html.erb after the body tag (my suggestion is to make a partial). In the end, drop the div with the fb-comments class where you want the comments box to appear.

like image 166
Alex Palcuie Avatar answered Sep 27 '22 22:09

Alex Palcuie