[Facebooker-talk] Facebook connect and One-line stories
Adeel Ahmad
adeel at proletariandesign.com
Sat Feb 28 02:49:50 EST 2009
Unfortunately I haven't been able to get very far integrating this into my
app. I get the "wrong number of arguments (1 for 2)" error on the line: <%
init_fb_connect "XFBML","Api" do %>in the application layout file and can't
seem to get away from it so my app never gets to the its main page. I am
able to get Mike's example app somewhat working. I'm on Rails 2.1.1 and the
example app is 2.2.2. Don't know if there is a dependency there.
However even with Mike's app, while I'm able to see the login button and
click it to get the Connect prompt, it always tells me I'm unable to login.
I did update the facebooker.yml file with my dev app keys.
Any ideas?
- Adeel
Founder/President
Proletarian Design LLC
1066 47th Ave., Suite 19
Oakland, CA 94601
t: 415.205.0274
f: 415.871.2200
skype: a2ahmad
twitter: _adeel
www.proletariandesign.com
On Fri, Feb 27, 2009 at 1:43 PM, Mike Mangino <mmangino at elevatedrails.com>wrote:
> Yep!
> The code pops up a window that lets the user pick what size story to show.
> It defaults to short story.
>
> Mike
>
> On Feb 27, 2009, at 4:35 PM, Adeel Ahmad wrote:
>
> Thanks, I'll dig into this tonight. This will be very useful.At the end,
> when you list code to prompt the user if they want to allow the
> notification, will this work for one-line stories as well? Since FB doesn't
> let us send these automatically I'm hoping a simple confirmation prompt will
> work.
>
>
> - Adeel
>
> Founder/President
> Proletarian Design LLC
> 1066 47th Ave., Suite 19
> Oakland, CA 94601
> t: 415.205.0274
> f: 415.871.2200
> skype: a2ahmad
> twitter: _adeel
> www.proletariandesign.com
>
>
> On Fri, Feb 27, 2009 at 1:27 PM, Mike Mangino <mmangino at elevatedrails.com>wrote:
>
>> I just updated facebooker and my sample application.
>>
>> To get a facebook session for the current user, you can use:
>>
>> before_filter :create_facebook_session
>>
>> This is like the old :set_facebook_session, but it doesn't store the
>> session in a cookie.
>>
>> To actually publish notifications, I use the following code in my
>> controller:
>> def create
>> @note = current_user.sent_notes.create!(params[:note])
>> flash[:notice] = "Note sent to #{@note.recipient.email<%23%7B at note.recipient.email>
>> }"
>> if facebook_session
>> flash[:user_action_to_publish] =
>> UserPublisher.create_note_sent(@note,facebook_session)
>> end
>> redirect_to notes_path
>> end
>>
>> That stores a new user action in the flash. If I wasn't redirecting, I
>> could assign it to @ user_action_to_publish
>>
>> Then, in my controller, I grab the object from the flash after a redirect:
>>
>> before_filter :load_actions_to_publish
>> def load_actions_to_publish
>> @user_action_to_publish = flash[:user_action_to_publish]
>> flash[:user_action_to_publish]=nil
>> end
>>
>> Finally, I have a bit in my view that calls these. This means that on the
>> page after an action would create a notification, the user is prompted to
>> allow the notification
>>
>>
>> in application.html.erb
>>
>> <% init_fb_connect "XFBML","Api" do %>
>> <%= fb_user_action(@user_action_to_publish) if
>> @user_action_to_publish%>
>> <%= yield :fb_connect%>
>> <% end %>
>>
>>
>> Mike
>>
>>
>>
>> On Feb 27, 2009, at 2:55 AM, Adeel Ahmad wrote:
>>
>> This is going to be great... I'm looking for feed publishing for my FB
>>> Connect app as well.
>>> I ran into the issue that FB's policy for Connect apps is that they don't
>>> let one-line stories get published automatically unless they are whitelisted
>>> by Facebook first. And that policy is still under review.
>>> The only other option is generating a feed dialog but I don't see feed
>>> dialog's in Facebooker?
>>>
>>> --
>>> - Adeel
>>>
>>> _______________________________________________
>>> Facebooker-talk mailing list
>>> Facebooker-talk at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/facebooker-talk
>>>
>>
>> --
>> Mike Mangino
>> http://www.elevatedrails.com
>>
>>
>>
>>
>
> --
> Mike Mangino
> http://www.elevatedrails.com
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090227/d245e189/attachment.html>
More information about the Facebooker-talk
mailing list