super_p && web

my little piece of "work memory"

3 notes &

Publish stream in Facebook & Twitter with OmniAuth

First of all, include OmniAuth to your rails app by this railscast or this.

Then add to Gemfile this gem:

gem ‘fb_graph’, ‘1.5.4’


After, you should turn on permission in your apps:

for Facebook:

for Twitter:

twitter read & write access

When your login from OmniAuth, social app ask your permission on update wall in Facebook and post tweet in Twitter.

Paste to you authentication model (my model named Person):

Publish message:

@person.publish(“Hello, my Facebook or Twitter friends!”)

Filed under rails omniauth twitter facebook fb_graph ruby on rails publish_stream

  1. superp posted this