in my app i'm using authlogic for user logging, cart-buying etc on my shop. But how can i introduce facebook login, and goods commenting using my authlogic gem? I reed about https://github.com/kalasjocke/authlogic_facebook_connect but as i think it is for rails <3 ? is it any solution to integrate facebook first commenting, and then regestiring and loging?
I think the omniauth gem in combination with authlogic will help you do what you're trying to do. Take a look at this example app. This walkthrough of how to incorporate it also looks pretty thorough.
Related
I've read multiple blogposts and watched the railscasts episodes to APIs. But I still got one problem, I'd like to use the API in a way Facebook or twitter does. It should be possible to register an API client. The client should become an id and an secret (should be the same like username or password, right?).
Somehow I think devise could do everything for me but I'm not sure cause I'm kinda new to rails.
Is there a best practice or is the devise solution a good and common one?
Thank you guys! <3
You should use the Doorkeeper gem. Here is a demo app using rails, devise and mongoid.
Booth that services use OAuth so if you want to implement similar functionality you can use this technology also.
I am currently creating a rails application that requires authentication. Currently, I'm doing custom authentication like that shown in in the following railscast episode:
http://railscasts.com/episodes/250-authentication-from-scratch-revised
I would, however, like to add the option to also Log-in through facebook. After doing some research, I found that the easiest way to add Facebook login involves using Devise/Omniauth for authentication. Would it be worth it to try and switch my authentication system to Devise/Omniauth, or is there an easier way to add facebook authentication? I have also looked at the Facebooker plugin, but it seems very outdated. Any suggestions? I am relatively new to Rails, so I appreciate any help I can get!
I've used Authlogic and Devise in conjunction with Omniauth (+ facebook/google/twitter/etc). I found that Devise is the better solution for me with all it's built in functionality. Getting it to work with Omniauth was a breeze. There's a great Railscast here: http://railscasts.com/episodes/235-devise-and-omniauth-revised
I would definitely recommend going that route. Every piece of the pie is updated often and has great documentation so it should be easy to use for people still learning Rails.
Facebook authentication with Devise/Omniauth is mature, widely used, and well-documented. It would make sense to go with that.
Basically, the app has to support sign up/sign in functionality and allow user to add friends and allow friends to chat.Since, I am just starting? with rails it's a bit overwhelming. How should I go about it
Also, the aim is not an application for production.
It'll be great if you could link to some working demos of the same.
Thanks!
If you are learning rails there are lots of great resources online. Try googling for a few.
I would suggest Michael Hartl's Rails Tutorial - http://ruby.railstutorial.org/ruby-on-rails-tutorial-book - it includes bits of what you want.
You would need ofcourse to read tutorials for rails beginners, I recommend the official rails guide.
For sign up/sign in, you could use the devise gem, and for chat push you could take a look at private_pub gem.
You can also check out a tutorial I did on how to achieve the same using devise and private_pub gem. I believe this should get you started http://goo.gl/l3e8zN
I'm looking for a plugin or a helper to help me with building a Twitter Rails app, stuff like signing in with Twitter, listing the users followers, etc. What is the best one out there?
Try using http://twitter.rubyforge.org/ I find it to be the one with the best documentation.
If you want to do more than simple API calls and go for user authentication as well look into
using devise with twitter https://github.com/MSch/devise-twitter
Railscasts has covered this in several episodes:
http://railscasts.com/episodes?utf8=%E2%9C%93&search=twitter
You can use
omniauth which can also cover services like github and facebook (if you feel like expanding)
https://github.com/intridea/omniauth
with the twitter strategy
omniauth-twitter (can't post link because of not enough rep, google it yo)
there are some railscasts that look over how you can integrate the two and this nettuts article which will give you an overall description of omniauth & providers
http://net.tutsplus.com/tutorials/ruby/how-to-use-omniauth-to-authenticate-your-users/
in my app I want to have the "Share" Facebook thing in the items with a pre-defined message, so the user clicks in "Share" and gets redirected to the Allow/Deny page and after allowing, the pre-defined message is automatically posted in the user's facebook wall. What's the best gem for my problem(I am sure there is one :p)?
Thanks!
P.S: I looked at the facebooker gem but it seems out-of-date and I have to use the latest Rails 3.
Take a look at some related questions. Is fb_graph or Koala gem better than facebooker2? and Which Facebook Ruby API
I'm currently using a custom solution for our facebook integration but I have been looking moving to a gem and these seem to be the main choices:
koala
fb_graph
facebooker2
So far I agree with David from the "Which Facebook Ruby API" post and am leaning towards fb_graph because of its simplicity. It should handle your requirements without any problems, just take a look at the sample app.
koala seems to a better choice, as the remaining gems are outdated. Either they support the old facebook API or are not in active development.
I am successfully using koala with rails 3.
https://github.com/arsduo/koala