[facebooker] Publish to Feed Popup Disappears in Firefox (Facebook Connect site)

14 views
Skip to first unread message

ai

unread,
May 3, 2010, 8:08:08 PM5/3/10
to facebooker
Hi,

I have a site running on Rails 2.2.2. Facebooker has been great for
us, integrating facebook connect was a breeze. No problem with
publishing to user's feed either, until recently.

The publish to feed popup is not showing in Firefox. It works perfect
in Chrome and Safari. Anyone has this issue?

When viewing page source, I see FB.Connect.showFeedDialog in the
<head> but the popup either doesn't appear or appears for 1 sec and
disappears.

//<![CDATA[
Element.observe(window,'load', function() {
FB_RequireFeatures(["XFBML", "Api"], function() {

FB.Facebook.init('88ed3bcef93e702e7fcfe51c8c641a4b','/
xd_receiver.html');

try {
FB.Connect.showFeedDialog("394615649039", {"short_note_body": "<a href=
\"http://food.local/ask/show/52\">How Many Times Should I Water A
Tomato Plant?</a>", "short_descr": "", "link_back": "http://food.local/
ask/show/52"}, null, null, null, FB.RequireConnect.promptConnect,
null, "", "");
} catch (e) { alert('RJS error:\n\n' + e.toString());
alert('FB.Connect.showFeedDialog(\"394615649039\", {\"short_note_body
\": \"<a href=\\\"http://food.local/ask/show/52\\\">How Many Times
Should I Water A Tomato Plant?</a>\", \"short_descr\": \"\",
\"link_back\": \"http://food.local/ask/show/52\"}, null, null,
null,FB.RequireConnect.promptConnect, null, \"\", \"\");'); throw e }
});
});
//]]>

Here's my rails code if it helps!

def create
........
if facebook_session
flash[:user_action_to_publish] =
UserPublisher.create_question_sent(@askshare,facebook_session)
end
end

application.html.erb
<head>
<%= fb_connect_javascript_tag %>
<% init_fb_connect "XFBML","Api" do %>
<%= fb_connect_stream_publish(@user_action_to_publish) if
@user_action_to_publish%>
<%= yield :fb_connect%>
<% end %>
</head>

UserPublisher Model
def question_sent_template
one_line_story_template "{*actor*} asks a question"
short_story_template "{*actor*} asks
{*short_note_body*}!","{*short_descr*}"
full_story_template "{*actor*} asks a question","{*note_body*}"
action_links action_link("Help! Answer This Question!",
"{*link_back*}")
end

def question_sent(askshare,facebook_session)
send_as :user_action
from facebook_session.user
data :short_note_body=>link_to( ask.title, "#{SITE}/ask/show/
#{ask.id}"),
:short_descr=>(h(truncate(ask.description,:length=>200))),
:link_back=>"#{SITE}/ask/show/#{ask.id}"
end

Any ideas, clues is greatly appreciated!

Thanks!
Ai

--
You received this message because you are subscribed to the Google Groups "facebooker" group.
To post to this group, send email to faceb...@googlegroups.com.
To unsubscribe from this group, send email to facebooker+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/facebooker?hl=en.

Mike Mangino

unread,
May 4, 2010, 9:02:10 AM5/4/10
to faceb...@googlegroups.com
At a minimum, you should change this to use the new stream publishing. Templatized publishing will be going away very shortly. (I'm actually surprised that it works!)

Mike
--
Mike Mangino
http://www.elevatedrails.com

ai

unread,
May 7, 2010, 2:55:13 PM5/7/10
to facebooker
Thanks Mike! I think I'm going to redo the whole facebook connect on
my site with the new open graph api. Does the new mogli support stream
publishing?

Ai
> Mike Manginohttp://www.elevatedrails.com
>
> --
> You received this message because you are subscribed to the Google Groups "facebooker" group.
> To post to this group, send email to faceb...@googlegroups.com.
> To unsubscribe from this group, send email to facebooker+...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/facebooker?hl=en.

Mike Mangino

unread,
May 7, 2010, 3:10:47 PM5/7/10
to faceb...@googlegroups.com
Yep:

user.feed_create(Mogli::Post.new(:message=>"Message"...))

Mike
--
Mike Mangino
Reply all
Reply to author
Forward
0 new messages