Facebook feed post to user's facebook wall

Hey i am trying to implemet facebook feed post to user’s facebook wall
functionality from my web application/website. i tried a lot but still
result less. Plz tell me which is the best way to implement facebook
feed post in user’s profle. I am using facebooker.

I am working in rails 2.3.8 verison. install Facebooker Gem as i also
need to fconnect functionality.

  1. Here is my dashboard controller … after login through fconnect we
    redirect user to “show” action of dashboard controller.

class DashboardsController < ApplicationController
#before_filter :login_required

layout ‘index’

#--------- Creatting sub class ----------
class FacebookPublisher < Facebooker::Rails::Publisher

def publish_pg_template
one_line_story_template “{actor} created/updated: restro”
short_story_template "{actor} created/updated: restro data! ",

def publish_pg(pg,facebook_session)
send_as :user_action
from facebook_session.user
data :actor => facebook_session.user.first_name
#--------- End sub class ----------

def show
@user = facebook_session.user

action = Facebooker::Feed::TemplatizedAction.new

action.page_actor_id = “104646262908753”

action.title_template = “test from {actor} did something”



#f = Facebooker::Session.create
#f.post ‘facebook.stream.publish’, :uid => @user.id, :message =>


flash[:user_action_to_publish] =



puts @user.id
fb_session = Facebooker::Session.create
fb_session.auth_token = @user.session.auth_token
fb_session.post(“facebook.feed.publishTemplatizedAction”, :target_ids
“”, :title_template => “Testing a News Feed post on a Page posted by
{actor}”, :title_data => “{}”, :body_template => “Check it out yo says
{name}.”, :body_data => “{“name”: “cbq”}”, :body_general => “Here is
body.”, :page_actor_id => “104646262908753”)

respond_to do |format|

Note :-> all the code between
“#-----------------------------------------------” are different
approaches to post feed into user’s or pages wall but i am still

  1. Here is my layout file data.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona... Your awsome facebook connected app

<%= stylesheet_link_tag ‘application’ %>
<%= javascript_include_tag :defaults %>

<%= fb_connect_javascript_tag %>
<% init_fb_connect “XFBML” %>

<% init_fb_connect “XFBML”,“Api” do %>
<%= fb_user_action(flash[:user_action_to_publish]) if
flash[:user_action_to_publish] %>
<% end %>

<%= flash[:notice] %>

<%= yield %>
  1. Here is my view file for “show” function with just a logout link.

<%= link_to “Sign Out”, user_session_path, :method => :delete

Also plz tell me weather should i have to go for another approach
instead of facebooker. should i have to update the rails version etc

First off, you’ll probably want to use the Facebook graph API (
Graph API - Documentation - Meta for Developers) rather than the old one which
are trying to use. And if you want a much simpler gem, check out:

Hmm i m looking into it Travis :slight_smile: Hope to get some help … well thanks
buddy. I will get back to u all very soon :slight_smile: