views:

255

answers:

3

Im building my blog in rails and I want to enable comments

I would like to have something posterous-like with a "facebook connect" and "login with twitter" option. The user can login with one of them and then post. No anonymous posts.

I dont want to add more login-services, just stay simple (i.e. no disqus)

How can I do this?

A: 

There are plugins that help with these, though the only example of both I have seen is this one (which I have not used):

http://tardate.blogspot.com/2010/01/released-authlogicrpx-111-gem-now-with.html

Probably worth looking at the code even if you don't use this plugin.

Andrew Kuklewicz
A: 

Hey, What I use is authlogic with authlogic_facebook_connect and of course you'll need facebooker and set up a facebook app etc... authlogic takes some time to setup so - podcast

Devenv
+4  A: 

I would suggest authlogic, like Devenv said. The tutorial on Railscast is very helpful. Also the author of authlogic himself created an example application as a tutorial

Authlogic can be extended to work with facebook and twitter with authlogic plugins:

  1. Facebook with authlogic_facebook_connect:

    $ sudo gem install facebooker
    $ script/plugin install git://github.com/kalasjocke/authlogic_facebook_connect.git
    

    then you can follow the Readme of authlogic_facebook_connect on github

  2. Twitter with authlogic_oauth:

    $ sudo gem install oauth
    $ sudo gem install authlogic-oauth
    

    then you can follow the Readme of authlogic_oauth on github again

Now you can enable login via facebook or twitter. Authlogic can do a lot more than that. If you want to, you can enable your railsapp to use openid authlogic_openid, too.

jigfox
Thank you Fahne!
Victor P
I'm glad I could help
jigfox