Devise and Koala to work with Facebook API - ruby-on-rails

can anyone tell me the get start with the facebook API using koala and devise. Is there any availability to get users based on the access token. I also want to know how to post it in free heroku web hosting.
I want a nice tutorial go through this.
thanks in advace

Finally i completed my task using fb_graph without need for devise. I posted it in following heroku url http://arcane-hamlet-5439.herokuapp.com
https://devcenter.heroku.com/articles/git tutorial helps me a lot to push it into heroku

Related

how to automatically publish the post on my app facebook page using rails

I have a blogging application in Ruby on Rails.
I want to publish all the blogs which are published on my rails application to my facebook page automatically from background jobs.
I explore the Facebook Graph Api Feed Api and do some hit and try but didn't get any success.
So could anyone please suggest that how I achieve that.
Thanks in advance.
Well, definitely the gem you are looking for is Koala
It is a lightweight, flexible library for Facebook with support for OAuth authentication, the Graph and REST APIs, realtime updates. It also allows you to post on your page.
It also allows you to post pictures and videos on Facebook
Here is a complete documentation for this gem

Posting to Twitter from Rails app with omniauth

I’m set up devise and omni-auth for both twitter and Facebook and now I’d like to allow users post a tweet or Facebook post from my app. I’m looked all over and confused on where to start for this. For right now I just want it to be a dummy post, doesn’t need to include anything from my rails app.
If you are looking for an example app for posting on twitter then you may check it out here with a working app posting on twitter:
https://github.com/railscasts/359-twitter-integration
Hope you may find it useful
To post tweets on Twitter you can go for Twitter gem.
Read the documentation here
For Facebook you can go for Koala gem
Read the documentation here

Rails3: How to secure an Api

I've a Rails app and now I'm building a phonegap app for mobiles.
My idea is create an API in my Rails app and the mobile app will be able read the json responses of my api controllers like in the #350 RailsCast tutorial:
http://railscasts.com/episodes/350-rest-api-versioning
In the Rails app, I've users, and they can register and login with Devise gem. For securing my API I read the #352 RailsCast tutorial:
http://railscasts.com/episodes/352-securing-an-api?view=asciicast
My question is if is possible securing my API somehow with Devise, because I want my users will be able register or login through phonegap app and if they log in the app successfully, they will be able read the json responses.
Someone knows tutorials about this?
Is better using also Oauth2 or only with Devise gem is possible?
thanks.
Here is a tutorioal of Google calendar with nice Omniauth 2.0 issues
http://blog.baugues.com/google-calendar-api-oauth2-and-ruby-on-rails

How to integrate Facebook in Rails

I hava a Rails application, I need to integrate Facebook. User can login with Facebook account and get his reviews in facebook and so on, how to deal with this case in rails? thanks!
Facebooker is no longer supported I recommend using Koala gem: https://github.com/arsduo/koala/wiki
There is a very comprehensive article here: http://www.packtpub.com/article/facebook-application-development-ruby-on-rails
And several existing plugins for this purpose like 'rfacebook', 'facebooker' or 'facebook-rails'. 'Facebooker' definitely has Facebook Connect abilities.

Facebook Connect + restful_authentication

I've been following Stuart's tutorial at
http://www.madebymany.co.uk/tutorial-for-restful_authentication-on-rails-with-facebook-connect-in-15-minutes-00523
and have been having a problem:
I get a NoMethodError in UsersController#link_user_accounts; Rails
doesn’t seem to recognize “facebook_session”. I have facebooker
installed and have successfully authenticated using the normal
Facebook API methods.
Has anyone tried this before? Anyone know what might be wrong? It
seems that somehow the Facebooker library isn't getting fully
loaded...
If you're trying to integrate Facebook Connect authentication to your application, I would strongly recommend switching from restful_authentication to Authlogic. It has an addon that gives you easy to use access to Facebook Connect.
You can download an example app that uses Authlogic here to take a look.
For the facebook-session to work, all files should be at the correct domain. Have you got all the files / libraries on the same domain?

Resources