Skip to content

Instantly share code, notes, and snippets.

@aeschright
Created August 10, 2010 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aeschright/517910 to your computer and use it in GitHub Desktop.
Save aeschright/517910 to your computer and use it in GitHub Desktop.
Install Facebooker2 gem. Install Mogli gem. Require facebooker2 in your gem config.
Set up Facebook API key at http://developers.facebook.com/setup/
Create config/facebooker.yml with your app_id and secret for each environment.
Create config/initializers/facebooker.rb with the line 'Facebooker2.load_facebooker_yaml'
Add 'include Facebooker2::Rails::Controller' to your application controller.
Put
<% fb_connect_async_js do %>
<%= yield :facebook_js %>
<% end %>
at the bottom of your application layout.
[Todo: describe adding fb connect login button, requesting permissions]
Example of how to create a new status post for the Facebook connect user:
current_facebook_user.feeds_create(Mogli::Post.new())
Post field options: :message, :picture, :link, :name, :description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment