developing facebook applications with ruby: which gems to use? - ruby-on-rails

i am currently planning a facebook application to be developed with ruby on rails.
i stumbled upon the facebooker gem, but there seem to be other gems around as well - actually there is also a facebooker2 gem.
what are the current options i have with ruby on rails and facebook development? which gems are recommendable?

The Facebook developers site lists some options for Rails along with samples. See http://wiki.developers.facebook.com/index.php/User:Using_Ruby_on_Rails_with_Facebook_Platform

I've been working with this over the past couple of days.
The facebooker gem is written to use the old FB RESTful javascript API.
Facebooker2 is written to use the new javascript Open Graph API. Facebooker2 depends upon the mogli gem.
I'm working with facebooker2 and hope to blog a tutorial once I've got it all worked out.
Here's my "tutorial". I hope this helps.
http://blog.jonathanrwallace.com/2010/06/accessing-facebook%E2%80%99s-open-graph-from-within-ruby-on-rails/

Related

Disqus SSO + RAILS Devise Gem

I'm trying to implement Disqus SSO with Rails.
I've built an app using Devise, but cannot figure out what to do with the sso code found on the Disqus API recipes. All of the documentation seems to be focussed on PHP, not Ruby.
Where is the correct place to use this function with Rails + Devise?
https://github.com/disqus/DISQUS-API-Recipes/tree/master/sso/ruby
I'm fairly new to ruby, but cannot find other resources on this topic.
I think u can use devise_cas_authenticatable gem
https://github.com/nbudin/devise_cas_authenticatable
hope top help you

Twitter bot with Rails

I am trying to create a Twitter bot with Ruby on Rails but I just dont find any useful information on this manner...
Is it posible?
I tried with the GEM twibot but it is deprecated it is not longer useful.
Does Rails have a method for trigger events when (for example) a twit is posted?
Anyone have worked with something like this?
Any tutorial?
Any information at all that is in current use, I mean that does work today with the Twitter API (Many of the stuff I googled does not work now)?
Thank you very much.
Twitter itself is running on Rails, and it has a REST API. You could easily write your own solution with ActiveResource
You can get started with the ActiveResource videos on Railscasts
rails per se does not have any support for twitter. it's just an mvc-web-framework. but there are a lot of ruby gems for twitter. my favorite is this https://github.com/jnunemaker/twitter but you can find a lot more here https://www.ruby-toolbox.com/categories/api_clients.html

Rails 3 and Facebook share

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

Is fb_graph or Koala ruby gem better than facebooker2, using the facebook graph?

Is the fb_graph gem better?
It seems to be newer, but the facebooker has a lot more people using.
http://github.com/nsanta/fbgraph
http://github.com/mmangino/facebooker
Update:
I looked into koala, and it seems it is a good choice as well.
http://github.com/arsduo/koala
I also figure out that fb_graph is different than fbgraph. This is the right one:
http://github.com/nov/fb_graph
And there is a new facebooker, that uses that Open Graph API, but it doesnt look as mature as the others:
http://github.com/wallace/facebooker2
I've been using Koala and have been very happy. It's very low level - meaning no abstractions that try to do stuff for you. The graph API is very straightforward, so this the best approach.
I ended up using Koala. It seems to be the best choice now. Facebooker2 is still very early stage, and Koala does a great job wrapping everything.
Don't get confused! Facebooker is for the old FB API!
The original Facebooker gem was split into two pieces for the new api - Facebooker2 for front-end helpers/auth and Mogli for back-end open graph api calls. Both are managed by the same person who did the original Facebooker gem - mike mangino - who does a great job of supporting both. Mogli is most directly comparable to Koala.
So far, I'm a big fan of koala, but I've not tried fb_graph. I did post a comparison of a few facebook gems here: http://jeffdeville.com/minifb-vs-koala-vs-mogli-facebook-graph-api-r

Which Ruby gems support the Facebook API?

I have a rails application using the Facebook API. I've seen several different Ruby gems for integrating with Facebook, but they look dated.
Is it best to write low-level calls myself? Is there a decent and current gem available?
Have any of these gems changed recently?
I'm beginning a new project -- which gem should I use as of September, 2012?
The Koala Gem is the way to go.
These Railscasts from July will tell you all you need to know about interacting with the Social Graph in Ruby and in Rails (both are paid episodes):
#361: Facebook Graph API: Learn how to use the Facebook Graph API with the Koala gem to fetch data from Facebook and post content through a user. Here I delve into permissions, error handling, and more.
#363: Facebook Open Graph: This episode builds on last week's episodes and shows how to integrate Facebook further through the Open Graph protocol. You will also learn how to tunnel your local server and move Facebook communication into a background process.
Having used it quite recently, I'd suggest Koala too. Pretty well documented, goes through the changes in api pretty smoothly, still maintained, and arsduo is a pretty cool guy.
According to this link,
With Facebook’s Graph API and the creation of the Open Graph protocol, it is now easier then ever before to read and write data from and to the “social graph”.
...
The following are proven to work with Ruby 1.9.x and Rails 3.0.0.
Gems
Cardinal Blue’s rest-graph
miniFB
FBGraph
Koala
Mogli
Plugins - Facebooker2
Middlewares
OmniAuth
rack-facebook
I would suggest either mogli or koala.
One known to have an active user base is facebooker2. The documentation is not really sufficient right now but its mailing list is very active, you get responses pretty quickly.
I've dug into the Koala deeply for my project, and I found it to be well written, solid code that has full test coverage. The main author, Alex Koppel, definitely knows what he's doing and he cares about the developer community. I needed to make a few improvements, which was easy thanks to the good architecture of the gem, and Alex was helpful in merging the changes into the master branch. Highly recommended.
The oauth2 from Intridea supports Facebook's Graph API.
Blog Post: http://intridea.com/2010/4/22/oauth2-gem-just-in-time-for-facebook-graph?blog=company
On github: http://github.com/intridea/oauth2
The sample source of Heroku's facebook application was used mogli,but now is koala.It is the best and great gem.Have a good group -- koala-users

Resources