How to update users facebook profile status from my rails web application - ruby-on-rails

in my rails web application I am implementing Facebook connectivity. I want that whenever user updates his/her status on my site his/her facebook status should also be updated. Is there any working rails application for this?
Please help.Thank you.

Have a look at the Koala gem which acts as a client to the Facebook graph API and does exactly what you need.

fb_graph as well also accomplishes what the koala gem does .
Though to update on a user to user basis you'll need to have some sort of login system in place. In that case I'd look at Devise using omniauth to accomplish this.

I use devise + omniauth for authentication and getting the right access token.
I use Koala for updating + reading information.

Related

Devise OmniAuth and Devise-otp

I am new to rails.
I want to do a google authentication app using Devise gem. (i.e) SignIn with Google after successful login by user and then I have to display otp view page (using Devise-otp gem)
Is it possible to implement those 2 features using Devise Gem in single app ?
If Possible can give me some tutorial links or some steps.
I completed Signin with google after that I don't know how to use Devise-otp to proceed second-step-verification process. so please help me.
I referred below links but it confused
https://github.com/AsteriskLabs/devise_google_authenticator
http://www.techhui.com/profiles/blogs/add-two-factor-authentication-to-your-rails-app-with-devise
You can use active_model_otp gem for this purpose.
Active model otp

Facebook login on iPhone. Authenticate with Rails Backend (Devise+Omniauth)

I am trying to implement a facebook user authentication in my iOS6 App through my Rails Backend running with Devise using omniauth. I am looking for a step by step guide how to setup my API and Devise + Authentication.
I only have a only have a rough knowledge about how to do that.
(on App) check if the user signs in on his facebook on iPhone
iPhone is authenticated client sided on Facebook. FB passes me his mobile auth token
I send my auth token or auth hash to my rails backend via API RESTful SSL.
Rails receives the Token and checks if it is valid. ( What command uses the least traffic against FB Graph API? with Koala Gem)
If valid. Check if the user already exists. If not, create a new user.
Create a new session.
Is this correct?
Are there any good examples?
Thank you very much.
I'm not familiar with the iPhone piece, but your approach after that is generally accurate. The only exception is that you would typically use provider + uid to find or create a user, rather than a token. That might be what you meant by your #5, but it wasn't clear to me.
Beyond that, there is a good (paid) Railscast on the subject of Omniauth + Devise, which would probably be worth the price for you:
http://railscasts.com/episodes/235-devise-and-omniauth-revised
It covers how you can receive and handle the auth hash, and it gives you a nice starting point for what your methods will look like.
if you don't access to pro episodes i have some links to help.
http://jessewolgamott.com/blog/2012/01/19/the-one-with-a-json-api-login-using-devise/
you can also look into it
http://net.tutsplus.com/tutorials/ruby/how-to-use-omniauth-to-authenticate-your-users/
Nice and easy to code
http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/
I hope these will work for you :)
http://www.orhancanceylan.com/rails-twitter-and-facebook-authentications-with-omniauth-and-devise/

how to share fixed data on facebook if used omniauth for authentication

I have used omniauth for authentication of user in rails. i just want to create a button on my site which when clicked should post to logged in users facebook profile a certain fixed data.
i have tried facebook_share gem but unable to specify the predefine text. kindly help me in this
thanks in advance
In place of facebook_share the better way is to use facebook api. link explains all
https://github.com/aayushkhandelwal11/training-assignment/blob/master/facebookshare.txt

Rails app connect to twitter

I am new Rails developer. Right now, I can let user register in my Rails App. I have database running also.
Todo:
After user register. I will ask permission to access his twitter. And I can access his tweets(including location information in tweets).
About this part, I have no idea how to do now? Can anyone give some links where I should start? I guess first step is I need authentication from twitter right?
Thanks
You are right, first of all you need authentication user from twitter: railscasts. Then you will find all methods there twitter api

Rails 3 and Devise: Omniauth vs. Facebook Connect

I am currently using Devise+Omniauth on my Rails 3 app to authenticate users. My client saw this and doesn't like how omniauth redirects you away from the site. He wants something like on digg.com, which I believe uses facebook connect to authenticate (and opens in a popup instead of redirecting).
What are some arguements for my client to keep him using the Omniauth method? Why is it better than Facebook connect.
And failing that, are there any good resources for logging users in with a facebook connect popup window? Or really anything involving facebook and a popup.
Thanks!
OmniAuth supports login via the Facebook Javascript SDK, which works through a popup. You just need to include the right files. I don't remember all the details, but this should help:
https://github.com/intridea/omniauth/issues/120

Resources