From schroeder.ken at gmail.com Thu May 1 00:28:45 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Thu, 1 May 2008 00:28:45 -0400 Subject: [Facebooker-talk] link_to_function with insert_html Message-ID: Anyone have any suggestions on how to do the below on facebook? <%= link_to_function "Add Task" do |page| page.insert_html :bottom, :task, :partial => 'email_form', :object => Task.new end %> Thanks --ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From digidigo at gmail.com Thu May 1 12:12:44 2008 From: digidigo at gmail.com (David Clements) Date: Thu, 1 May 2008 10:12:44 -0600 Subject: [Facebooker-talk] link_to_function with insert_html In-Reply-To: References: Message-ID: That is cool, I didn't even realize that you could do that in rails. So the issue here is that you can't use Prototype within the FBJS sandbox. So what I would do is look at the javascript that gets created here and then define your own methods that do the same thing using FBJS. In this case you will want define Insertion.Bottom. Dave On Wed, Apr 30, 2008 at 10:28 PM, Ken Schroeder wrote: > Anyone have any suggestions on how to do the below on facebook? > <%= link_to_function "Add Task" do |page| > page.insert_html :bottom, :task, :partial => 'email_form', :object > => Task.new > end %> > > > Thanks --ken > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Thu May 1 09:08:13 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 1 May 2008 08:08:13 -0500 Subject: [Facebooker-talk] facebook_session not working for me In-Reply-To: References: <77A55673-C668-41BC-BD9B-D06195577178@elevatedrails.com> <743138BE-FDB7-411D-85E3-625C84F0DA0E@elevatedrails.com> <428B51C7-D9C3-47DD-BC1B-31A817613DD2@elevatedrails.com> Message-ID: <0C7D13BD-4F84-4559-935C-080E56D3B637@elevatedrails.com> You''re certainly not the first to do that. I spent a day trying to figure out why profile updates weren't happening. It turns out I was updating one user and looking at a different user's profile. It happens to all of us :) Mike On Apr 30, 2008, at 9:19 PM, Dustin Anderson wrote: > Just for the record, I'm an idiot - this was likely working all along > - I was looking in the Mini-Feed section to see the profile_fbml > update information, not the profile area. Sorry for the runaround > everyone... I'm learning ;-) > -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Thu May 1 12:28:24 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 1 May 2008 11:28:24 -0500 Subject: [Facebooker-talk] link_to_function with insert_html In-Reply-To: References: Message-ID: <744D4463-0E9C-4C87-9ED3-5FB8BEEF28B5@elevatedrails.com> I would love some patches to make Facebooker.js better imitate Prototype. Hopefully this won't be too hard to write! Mike On May 1, 2008, at 11:12 AM, David Clements wrote: > That is cool, I didn't even realize that you could do that in rails. > > So the issue here is that you can't use Prototype within the FBJS > sandbox. So what I would do is look at the javascript that gets > created here and then define your own methods that do the same thing > using FBJS. > > In this case you will want define Insertion.Bottom. > > > Dave > > On Wed, Apr 30, 2008 at 10:28 PM, Ken Schroeder > wrote: > Anyone have any suggestions on how to do the below on facebook? > <%= link_to_function "Add Task" do |page| > page.insert_html :bottom, :task, :partial => > 'email_form', :object => Task.new > end %> > > > Thanks --ken > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From bjclark at scidept.com Thu May 1 12:33:53 2008 From: bjclark at scidept.com (BJ Clark) Date: Thu, 1 May 2008 10:33:53 -0600 Subject: [Facebooker-talk] link_to_function with insert_html In-Reply-To: <744D4463-0E9C-4C87-9ED3-5FB8BEEF28B5@elevatedrails.com> References: <744D4463-0E9C-4C87-9ED3-5FB8BEEF28B5@elevatedrails.com> Message-ID: <1037E563-EA68-46F4-89C7-A78B3C0390B6@scidept.com> Mike, I'd love to work on this. Is there any documentation for what currently does and does not work? BJ Clark Inigral On May 1, 2008, at 10:28 AM, Mike Mangino wrote: > I would love some patches to make Facebooker.js better imitate > Prototype. Hopefully this won't be too hard to write! > > Mike > > On May 1, 2008, at 11:12 AM, David Clements wrote: > >> That is cool, I didn't even realize that you could do that in rails. >> >> So the issue here is that you can't use Prototype within the FBJS >> sandbox. So what I would do is look at the javascript that gets >> created here and then define your own methods that do the same >> thing using FBJS. >> >> In this case you will want define Insertion.Bottom. >> >> >> Dave >> >> On Wed, Apr 30, 2008 at 10:28 PM, Ken Schroeder > > wrote: >> Anyone have any suggestions on how to do the below on facebook? >> <%= link_to_function "Add Task" do |page| >> page.insert_html :bottom, :task, :partial => >> 'email_form', :object => Task.new >> end %> >> >> >> Thanks --ken >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From mmangino at elevatedrails.com Thu May 1 12:38:11 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 1 May 2008 11:38:11 -0500 Subject: [Facebooker-talk] link_to_function with insert_html In-Reply-To: <1037E563-EA68-46F4-89C7-A78B3C0390B6@scidept.com> References: <744D4463-0E9C-4C87-9ED3-5FB8BEEF28B5@elevatedrails.com> <1037E563-EA68-46F4-89C7-A78B3C0390B6@scidept.com> Message-ID: Not really. The only thing that works is very basic Ajax (i.e. link_to_remote) Mike On May 1, 2008, at 11:33 AM, BJ Clark wrote: > Mike, > I'd love to work on this. Is there any documentation for what > currently does and does not work? > > BJ Clark > Inigral > > > -- Mike Mangino http://www.elevatedrails.com From tandaraho at gmail.com Tue May 6 12:37:15 2008 From: tandaraho at gmail.com (tanda raho) Date: Tue, 6 May 2008 09:37:15 -0700 Subject: [Facebooker-talk] check_friendship method only returning value of last pair Message-ID: Hello, I'm new to facebooker and ruby, so not sure if the issue I am having is due to my misunderstanding or a bug in facebooker plugin. Here is what I have: def show @current_user ||= facebook_session.user @member ||= params[:id].to_s==@current_user.id.to_s ? @current_user : Facebooker::User.new(params[:id]) #for each of current_user's friends, check if they are friends with the member and return an array of only the mutual friends @mutual_friends = [] #initializing array to store mutual friends #create an array in the format of [[friend1ID,memberID],[friend2ID,memberID]...] @friends_array = @current_user.friends.map {|friend| [friend.id, at member.id]} #submit that array to check_friendship and store the resultant hash, which should have format {[friend1ID,memberID]=>true,[friend2ID,memberID]=>false} @friends_hash = facebook_session.check_friendship(@friends_array) # for each value in the returned hash, store the friendID if value is true @friends_hash.each {|key,value| @mutual_friends << key[0] if value} end Looking at check_friendship method, the hash returned should have the same size as the array passed in. But the hash being returned (@friends_hash) always only has size of 1. Is this happening because of the code in check_friendship I commented below? # File lib/facebooker/session.rb, line 218 def check_friendship(array_of_pairs_of_users) uids1 = [] uids2 = [] array_of_pairs_of_users.each do |pair| uids1 = pair.first ############ should this be uids1 << pair.first ############## uids2 = pair.last ############ should this be uids2 << pair.last ############## end post('facebook.friends.areFriends', :uids1 => uids1, :uids2 => uids2) end I tried to change the uid assignment to << rather than = in session.rb, but it is raising an IncorrectSignature error which I couldn't track down how to fix/override. Any help would be appreciated! Thanks! From eatsleepgolf at gmail.com Wed May 7 06:28:19 2008 From: eatsleepgolf at gmail.com (Travis Jeffery) Date: Wed, 7 May 2008 06:28:19 -0400 Subject: [Facebooker-talk] Updating a Facebook Status Message-ID: <2B352F40-A434-42F0-8360-F82A488EA8C2@gmail.com> Does anyone know how to update a Facebook Status with Facebooker? From tobyhede at info-architects.net Wed May 7 20:25:25 2008 From: tobyhede at info-architects.net (Toby Hede) Date: Thu, 8 May 2008 10:25:25 +1000 Subject: [Facebooker-talk] Updating a Facebook Status In-Reply-To: <2B352F40-A434-42F0-8360-F82A488EA8C2@gmail.com> References: <2B352F40-A434-42F0-8360-F82A488EA8C2@gmail.com> Message-ID: I don't think Facebook actually provides that functionality. On Wed, May 7, 2008 at 8:28 PM, Travis Jeffery wrote: > Does anyone know how to update a Facebook Status with Facebooker? > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From digidigo at gmail.com Wed May 7 20:51:33 2008 From: digidigo at gmail.com (David Clements) Date: Wed, 7 May 2008 18:51:33 -0600 Subject: [Facebooker-talk] Updating a Facebook Status In-Reply-To: References: <2B352F40-A434-42F0-8360-F82A488EA8C2@gmail.com> Message-ID: Facebook does provide this and a way to request permission from the user to allow it. i don't think it has been added to facebooker yet. Wouldn't be too bad to add it Dave On Wed, May 7, 2008 at 6:25 PM, Toby Hede wrote: > I don't think Facebook actually provides that functionality. > > > > On Wed, May 7, 2008 at 8:28 PM, Travis Jeffery > wrote: > > Does anyone know how to update a Facebook Status with Facebooker? > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shanev at gmail.com Wed May 7 22:25:35 2008 From: shanev at gmail.com (Shane Vitarana) Date: Wed, 7 May 2008 21:25:35 -0500 Subject: [Facebooker-talk] New test helpers Message-ID: <4ab757a40805071925m5bcbe7r141202367c106115@mail.gmail.com> Hey guys- A few methods useful for testing have been added to trunk: 1) facebook_post For use in controller unit tests and integration tests. Basically, it delegates to the standard "post" method for simulating post requests in a test, but constructs mock fb_sig params and passes them along to the requested action with the rest of the params that the test specifies. 2) assert_facebook_redirect_to Takes a URL as an argument, extracts the redirection URL from an fb:redirect tag, and asserts the two are equal. NOTE: This method replaces assert_fb_redirect_to. 3) follow_facebook_redirect! Used like follow_redirect! in integration tests. Again, extracts the URL from a response containing fb:redirect and makes a call to facebook_post to that URL. Give these a roll and let me know if there are any issues. Thanks a lot to Ryan Kinderman for this patch and the descriptions above. Shane -- http://shanesbrain.net | http://crimsonjet.com | http://myfitbuddy.com From tandaraho at gmail.com Thu May 8 04:00:18 2008 From: tandaraho at gmail.com (tanda raho) Date: Thu, 8 May 2008 01:00:18 -0700 Subject: [Facebooker-talk] check_friendship method only returning value of last pair In-Reply-To: References: Message-ID: Ok, I think I fixed the problem with check_friendship not actually using all the array data passed to it and only sending Facebook the last friend combination. I had to add a couple of lines to convert the arrays to comma delimited strings as per the facebook API. Perhaps there are more efficient ways of making these changes, so any suggestions are welcome. I'm new to ruby/rails/facebooker, so not sure how it works to submit bug reports/patches for this gem/plugin. If anyone can point me to the instructions, I would be more than glad to try and get the patch through. I had to change check_friendship() in lib/facebooker/session.rb to the following: def check_friendship(array_of_pairs_of_users) uids1 = [] uids2 = [] array_of_pairs_of_users.each do |pair| uids1 << pair.first #CHANGED = to << uids2 << pair.last #CHANGED = to << end uids1 = uids1.join(',') # ADDED THIS LINE uids2 = uids2.join(',') # ADDED THIS LINE post('facebook.friends.areFriends', :uids1 => uids1, :uids2 => uids2) end Thanks! On Tue, May 6, 2008 at 9:37 AM, tanda raho wrote: > Hello, I'm new to facebooker and ruby, so not sure if the issue I am > having is due to my misunderstanding or a bug in facebooker plugin. > Here is what I have: > > def show > @current_user ||= facebook_session.user > @member ||= params[:id].to_s==@current_user.id.to_s ? > @current_user : Facebooker::User.new(params[:id]) > > #for each of current_user's friends, check if they are friends > with the member and return an array of only the mutual friends > @mutual_friends = [] #initializing array to store mutual friends > > #create an array in the format of > [[friend1ID,memberID],[friend2ID,memberID]...] > @friends_array = @current_user.friends.map {|friend| > [friend.id, at member.id]} > > #submit that array to check_friendship and store the resultant > hash, which should have format > {[friend1ID,memberID]=>true,[friend2ID,memberID]=>false} > @friends_hash = facebook_session.check_friendship(@friends_array) > > # for each value in the returned hash, store the friendID if value is true > @friends_hash.each {|key,value| @mutual_friends << key[0] if value} > end > > Looking at check_friendship method, the hash returned should have the > same size as the array passed in. But the hash being returned > (@friends_hash) always only has size of 1. > > Is this happening because of the code in check_friendship I commented below? > > # File lib/facebooker/session.rb, line 218 > def check_friendship(array_of_pairs_of_users) > uids1 = [] > uids2 = [] > array_of_pairs_of_users.each do |pair| > uids1 = pair.first ############ should this be uids1 << > pair.first ############## > uids2 = pair.last ############ should this be uids2 << > pair.last ############## > end > post('facebook.friends.areFriends', :uids1 => uids1, :uids2 => uids2) > end > > I tried to change the uid assignment to << rather than = in > session.rb, but it is raising an IncorrectSignature error which I > couldn't track down how to fix/override. > > Any help would be appreciated! > > Thanks! > From eatsleepgolf at gmail.com Fri May 9 16:55:22 2008 From: eatsleepgolf at gmail.com (Travis Jeffery) Date: Fri, 9 May 2008 16:55:22 -0400 Subject: [Facebooker-talk] Updating a Facebook Status In-Reply-To: References: <2B352F40-A434-42F0-8360-F82A488EA8C2@gmail.com> Message-ID: Yeah they do the method is facebook.users.setStatus (http://developers.facebook.com/documentation.php?v=1.0&method=users.setStatus ) So to add support for it in would it be something like: ## # Update Facbook Status def update_status @status = post('facebook.users.setStatus'. :string => params[:status]) end In /lib/facebooker/user.rb? I'm not gonna lie, I have no clue on what to do for this kind of thing. Thanks On May 7, 2008, at 8:25 PM, Toby Hede wrote: > I don't think Facebook actually provides that functionality. > > > > On Wed, May 7, 2008 at 8:28 PM, Travis Jeffery > wrote: >> Does anyone know how to update a Facebook Status with Facebooker? >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From hooligan495 at verizon.net Mon May 12 13:52:58 2008 From: hooligan495 at verizon.net (Jay McGaffigan) Date: Mon, 12 May 2008 13:52:58 -0400 Subject: [Facebooker-talk] Using forms in Facebook(er) Message-ID: <05f701c8b459$03f499f0$0bddcdd0$@net> Hi, I just ran across an interesting occurrence and maybe this is well know but I thought I'd ask about it. I have a form in my canvaspage . I had set the method to "GET" and I kept getting an IncorrectSignature exception in the facebooker plugin. When I change the method type to "POST" lo and behold things work. No exception. I don't understand why. I'm starting to dig into this and was wondering if anyone had any thoughts on how to figure out why this is happening? Do you think it's a facebook or facebooker or user(me) issue? Any ideas would be most appreciated. Thanks a bunch! Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.bollenbach at pobox.com Tue May 13 11:38:17 2008 From: brad.bollenbach at pobox.com (brad.bollenbach at pobox.com) Date: Tue, 13 May 2008 11:38:17 -0400 Subject: [Facebooker-talk] Using forms in Facebook(er) In-Reply-To: <05f701c8b459$03f499f0$0bddcdd0$@net> References: <05f701c8b459$03f499f0$0bddcdd0$@net> Message-ID: <6C0B97EF-CCDC-4982-9236-7545E9AFDC23@pobox.com> On 12-May-08, at 13:52 , Jay McGaffigan wrote: > Hi, > I just ran across an interesting occurrence and maybe this is well > know but I thought I?d ask about it. > > I have a form in my canvaspage . I had set the method to ?GET? and I > kept getting an IncorrectSignature exception in the facebooker > plugin. When I change the method type to ?POST? lo and behold > things work. No exception. > > I don?t understand why. I?m starting to dig into this and was > wondering if anyone had any thoughts on how to figure out why this > is happening? Do you think it?s a facebook or facebooker or > user(me) issue? As best I can tell, it's a bug: http://bugs.developers.facebook.com/show_bug.cgi?id=544 When I use a hand-specified URL, like: http://apps.facebook.com/myapp/search?foo=bar that GET works, but a GET form with a foo param raises IncorrectSignature. I worked around this by having my GET form call an "unprotected" action (doesn't validate the FB params), which redirects to a URL like the above, e.g.: def search redirect_to "http:// apps.facebook.com#{Facebooker.facebook_path_prefix}/merchants/searchfb? l=#{CGI.escape(params[:l])}&q=#{CGI.escape(params[:q])}" end Odd, brutish, functional. Cheers, Brad From mmangino at elevatedrails.com Tue May 13 11:48:43 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 13 May 2008 10:48:43 -0500 Subject: [Facebooker-talk] Updating a Facebook Status In-Reply-To: References: <2B352F40-A434-42F0-8360-F82A488EA8C2@gmail.com> Message-ID: That was pretty close. Here is the method in user.rb: ## # Set the status of the user # # DOES NOT prepend "is" to the message # # requires extended permission. def status=(message) case message when String session .post ('facebook.users.setStatus',:status=>message,:status_includes_verb=>1) do |ret| ret end when Status @status = message when Hash @status = Status.from_hash(message) end end Basically, we need to handle both setting the status with a string as well as with a Hash. The Hash setter is used to populate the data from Facebook. I added that code as well as some tests. To make status updates work, it requires your application to have some extended permissions. I added code for that as well. Now, in your controller you can do something like: before_filter :ensure_has_status_update That will request permission to update status if it doesn't exist. You can tell Facebook where to redirect by re-defining the application_needs_permission method to look something like: def application_needs_permission(perm) redirect_to(facebook_session.permission_url(perm,:next=>"http://apps.facebook.com/mangino'+request.request_uri)) end Mike On May 9, 2008, at 3:55 PM, Travis Jeffery wrote: > Yeah they do the method is facebook.users.setStatus (http://developers.facebook.com/documentation.php?v=1.0&method=users.setStatus > ) > > So to add support for it in would it be something like: > > ## > # Update Facbook Status > def update_status > @status = post('facebook.users.setStatus'. :string => > params[:status]) > end > > In /lib/facebooker/user.rb? I'm not gonna lie, I have no clue on > what to do for this kind of thing. > > Thanks > > On May 7, 2008, at 8:25 PM, Toby Hede wrote: >> I don't think Facebook actually provides that functionality. >> >> >> >> On Wed, May 7, 2008 at 8:28 PM, Travis Jeffery > > wrote: >>> Does anyone know how to update a Facebook Status with Facebooker? >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From pezlists at gmail.com Thu May 15 04:48:23 2008 From: pezlists at gmail.com (Perryn Fowler) Date: Thu, 15 May 2008 18:48:23 +1000 Subject: [Facebooker-talk] Facebooker support for iframe apps Message-ID: <1c319b810805150148h3ed04a2ej1e304bb5aa943112@mail.gmail.com> Hi facebooker-ers, It looks to me like facebooker does not currently support iframe facebook apps - or am I missing something? My first problem as I understand it is as follows - When you are logged into facebook, and access a facebook application, facebook tacks on a whole lot of extra fb_sig parameters to the request (including fb_sig_user) that the application can then validate to authenticate the user. ( via a frustratingly poorly documented algorithm ) I found that for my facebook application that uses an iframe, facebooker didn't seem to be performing this validation. Digging into the code, I found in controller.rb, that the validation is only performed if the parameter 'fb_sig_in_canvas' is present, and when the request is for an iframe the parameter 'fb_sig_in_iframe' is sent instead. So, I patched it to also perform the validation in that case as well. Does this make any sense? Is this patch something worth submitting? If so. how should I do that? The next problem is that now, with the patch, facebooker validates these parameters and authenticates the facebook user placing their credentials in the session, and all proceeds smoothly. However, if the user logs out of facebook, their credentials remain in the session and they are left still logged in to the facebook application. If a second user logs into facebook and accesses the application, they will be logged in to it as the first user. I'm not sure what to do about this.. any ideas? cheers Perryn From sudara at alonetone.com Thu May 15 09:48:07 2008 From: sudara at alonetone.com (sudara) Date: Thu, 15 May 2008 15:48:07 +0200 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre Message-ID: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> Hi there, I have a controller that responds to fbml and html, with html at the top. In all browsers, this works as expected - When I'm hitting the controller from my normal app, I get html. When I hit it inside facebook, I get fbml. However, with Firefox 3 hitting the normal app, I'm getting fbml for some odd reason. Am I crazy? Sudara From digidigo at gmail.com Thu May 15 11:45:11 2008 From: digidigo at gmail.com (David Clements) Date: Thu, 15 May 2008 09:45:11 -0600 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> Message-ID: Hey Sudara, I currently have this implemented for one of my apps and I don't see this problem in Firefox 3. Can you post some code? And the pieces of the log? You don't have caching turned on do you? Dave On Thu, May 15, 2008 at 7:48 AM, sudara wrote: > Hi there, > > I have a controller that responds to fbml and html, with html at the top. > > In all browsers, this works as expected - When I'm hitting the controller > from my normal app, I get html. When I hit it inside facebook, I get fbml. > > However, with Firefox 3 hitting the normal app, I'm getting fbml for some > odd reason. > > Am I crazy? > > Sudara > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sudara at alonetone.com Fri May 16 15:59:19 2008 From: sudara at alonetone.com (sudara) Date: Fri, 16 May 2008 21:59:19 +0200 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> Message-ID: <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> Wow, so I'm trippen out. The answer: removed: Mime::Type.register 'text/html', :fbml added: Mime::Type.register_alias 'text/html', :fbml Every request works as it now should. I've been poking around in vendor/rails/actionpack/lib/ action_controller/mime_type.rb to try and determine what the heck would make Firefox behave so uniquely. Then again, I should have register_alias'd to begin with, no? Funny thing is, it was working like a breeze until Firefox 3. Must have *something* to do with the accept headers it sends? anywho, I couldn't find much Documentation about registering the fbml alias, but maybe we can throw a gotcha note in there. Sudara On May 16, 2008, at 8:12 PM, David Clements wrote: > I confirmed this for you. Firefox 3 returns FBML and Firefox 2 does > not. > > Dave > > On Fri, May 16, 2008 at 10:03 AM, sudara wrote: > Hey there. > > I prematurely posted. I'm still having this issue, but I unfairly > left out the small detail that I'm on Rails 2.1 RC1. > > I do not have caching enabled, and the logs look absolutely > "correct" - That is, there is no difference in incoming params > between a request coming from Safari and a request coming from > Firefox. What is different is that Firefox triggers the fbml > respond_to block. > > I'm going to investigate a bit more, just thought I would send the > message out in the case that someone else has seen this. > > And actually, this is on a live site - http://alonetone.com/sudara > is an example of a page that triggers the fbml layout in Firefox3 > > Sudara > > > On May 15, 2008, at 5:45 PM, David Clements wrote: > >> Hey Sudara, >> >> I currently have this implemented for one of my apps and I don't >> see this problem in Firefox 3. >> >> Can you post some code? And the pieces of the log? >> >> You don't have caching turned on do you? >> >> Dave >> >> On Thu, May 15, 2008 at 7:48 AM, sudara wrote: >> Hi there, >> >> I have a controller that responds to fbml and html, with html at >> the top. >> >> In all browsers, this works as expected - When I'm hitting the >> controller from my normal app, I get html. When I hit it inside >> facebook, I get fbml. >> >> However, with Firefox 3 hitting the normal app, I'm getting fbml >> for some odd reason. >> >> Am I crazy? >> >> Sudara >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > From david.g.clements at gmail.com Fri May 16 16:17:16 2008 From: david.g.clements at gmail.com (David Clements) Date: Fri, 16 May 2008 14:17:16 -0600 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> Message-ID: Were you adding this yourself somwhere? Dave Sent from my iPhone On May 16, 2008, at 1:59 PM, sudara wrote: > Wow, so I'm trippen out. > > The answer: > > removed: > Mime::Type.register 'text/html', :fbml > > added: > Mime::Type.register_alias 'text/html', :fbml > > Every request works as it now should. > > I've been poking around in vendor/rails/actionpack/lib/ > action_controller/mime_type.rb to try and determine what the heck > would make Firefox behave so uniquely. > > Then again, I should have register_alias'd to begin with, no? > > Funny thing is, it was working like a breeze until Firefox 3. Must > have *something* to do with the accept headers it sends? > > anywho, I couldn't find much Documentation about registering the > fbml alias, but maybe we can throw a gotcha note in there. > > Sudara > > On May 16, 2008, at 8:12 PM, David Clements wrote: > >> I confirmed this for you. Firefox 3 returns FBML and Firefox 2 >> does not. >> >> Dave >> >> On Fri, May 16, 2008 at 10:03 AM, sudara >> wrote: >> Hey there. >> >> I prematurely posted. I'm still having this issue, but I unfairly >> left out the small detail that I'm on Rails 2.1 RC1. >> >> I do not have caching enabled, and the logs look absolutely >> "correct" - That is, there is no difference in incoming params >> between a request coming from Safari and a request coming from >> Firefox. What is different is that Firefox triggers the fbml >> respond_to block. >> >> I'm going to investigate a bit more, just thought I would send the >> message out in the case that someone else has seen this. >> >> And actually, this is on a live site - http://alonetone.com/sudara >> is an example of a page that triggers the fbml layout in Firefox3 >> >> Sudara >> >> >> On May 15, 2008, at 5:45 PM, David Clements wrote: >> >>> Hey Sudara, >>> >>> I currently have this implemented for one of my apps and I don't >>> see this problem in Firefox 3. >>> >>> Can you post some code? And the pieces of the log? >>> >>> You don't have caching turned on do you? >>> >>> Dave >>> >>> On Thu, May 15, 2008 at 7:48 AM, sudara >>> wrote: >>> Hi there, >>> >>> I have a controller that responds to fbml and html, with html at >>> the top. >>> >>> In all browsers, this works as expected - When I'm hitting the >>> controller from my normal app, I get html. When I hit it inside >>> facebook, I get fbml. >>> >>> However, with Firefox 3 hitting the normal app, I'm getting fbml >>> for some odd reason. >>> >>> Am I crazy? >>> >>> Sudara >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From sudara at alonetone.com Fri May 16 17:20:27 2008 From: sudara at alonetone.com (sudara) Date: Fri, 16 May 2008 23:20:27 +0200 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: <6EC054BD-A2DF-49DC-BB28-E935C0815A35@gmail.com> References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> <6EC054BD-A2DF-49DC-BB28-E935C0815A35@gmail.com> Message-ID: I'm using respond_to and serving facebook and a normal app from the same action / controller. I added it a long time ago, but I just double checked - without explicitly adding it the format.fbml calls fail with a MimeType error. In fact, I half-assumed this would be in facebooker by now (the adding of the mime type) since following convention, it basically allows facebooker to work out of the box with respond_to I keep it safely tucked in config/initializers/mime_types.rb Sudara On May 16, 2008, at 10:49 PM, David Clements wrote: > Hmm... Weird. > > Where did you add it? I haven't had to do anything to support both > fbml and html. Although I just use the default rendering i don't > call respond_to > > Dave > > On May 16, 2008, at 2:34 PM, sudara wrote: > >> Yes sir. >> >> Without it, I get a Mime::Type error. >> >> Sudara >> >> On May 16, 2008, at 10:17 PM, David Clements wrote: >> >>> Were you adding this yourself somwhere? >>> >>> Dave >>> >>> Sent from my iPhone >>> >>> On May 16, 2008, at 1:59 PM, sudara wrote: >>> >>>> Wow, so I'm trippen out. >>>> >>>> The answer: >>>> >>>> removed: >>>> Mime::Type.register 'text/html', :fbml >>>> >>>> added: >>>> Mime::Type.register_alias 'text/html', :fbml >>>> >>>> Every request works as it now should. >>>> >>>> I've been poking around in vendor/rails/actionpack/lib/ >>>> action_controller/mime_type.rb to try and determine what the heck >>>> would make Firefox behave so uniquely. >>>> >>>> Then again, I should have register_alias'd to begin with, no? >>>> >>>> Funny thing is, it was working like a breeze until Firefox 3. >>>> Must have *something* to do with the accept headers it sends? >>>> >>>> anywho, I couldn't find much Documentation about registering the >>>> fbml alias, but maybe we can throw a gotcha note in there. >>>> >>>> Sudara >>>> >>>> On May 16, 2008, at 8:12 PM, David Clements wrote: >>>> >>>>> I confirmed this for you. Firefox 3 returns FBML and Firefox 2 >>>>> does not. >>>>> >>>>> Dave >>>>> >>>>> On Fri, May 16, 2008 at 10:03 AM, sudara >>>>> wrote: >>>>> Hey there. >>>>> >>>>> I prematurely posted. I'm still having this issue, but I >>>>> unfairly left out the small detail that I'm on Rails 2.1 RC1. >>>>> >>>>> I do not have caching enabled, and the logs look absolutely >>>>> "correct" - That is, there is no difference in incoming params >>>>> between a request coming from Safari and a request coming from >>>>> Firefox. What is different is that Firefox triggers the fbml >>>>> respond_to block. >>>>> >>>>> I'm going to investigate a bit more, just thought I would send >>>>> the message out in the case that someone else has seen this. >>>>> >>>>> And actually, this is on a live site - http://alonetone.com/ >>>>> sudara is an example of a page that triggers the fbml layout in >>>>> Firefox3 >>>>> >>>>> Sudara >>>>> >>>>> >>>>> On May 15, 2008, at 5:45 PM, David Clements wrote: >>>>> >>>>>> Hey Sudara, >>>>>> >>>>>> I currently have this implemented for one of my apps and I >>>>>> don't see this problem in Firefox 3. >>>>>> >>>>>> Can you post some code? And the pieces of the log? >>>>>> >>>>>> You don't have caching turned on do you? >>>>>> >>>>>> Dave >>>>>> >>>>>> On Thu, May 15, 2008 at 7:48 AM, sudara >>>>>> wrote: >>>>>> Hi there, >>>>>> >>>>>> I have a controller that responds to fbml and html, with html >>>>>> at the top. >>>>>> >>>>>> In all browsers, this works as expected - When I'm hitting the >>>>>> controller from my normal app, I get html. When I hit it inside >>>>>> facebook, I get fbml. >>>>>> >>>>>> However, with Firefox 3 hitting the normal app, I'm getting >>>>>> fbml for some odd reason. >>>>>> >>>>>> Am I crazy? >>>>>> >>>>>> Sudara >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > From digidigo at gmail.com Fri May 16 17:32:01 2008 From: digidigo at gmail.com (David Clements) Date: Fri, 16 May 2008 15:32:01 -0600 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> <6EC054BD-A2DF-49DC-BB28-E935C0815A35@gmail.com> Message-ID: This is what I am saying ... I currently use facebooker without respond_to, I just name my views correctly and it works fine. apps.faceboor.com/meemcloud/privacy and www.meemcloud.com/privacy Hit the same action. I haven't looked into the code yet to see what making this work. I am not on RC1 though. Dave On Fri, May 16, 2008 at 3:20 PM, sudara wrote: > I'm using respond_to and serving facebook and a normal app from the same > action / controller. > > I added it a long time ago, but I just double checked - without explicitly > adding it the format.fbml calls fail with a MimeType error. > > In fact, I half-assumed this would be in facebooker by now (the adding of > the mime type) since following convention, it basically allows facebooker to > work out of the box with respond_to > > I keep it safely tucked in config/initializers/mime_types.rb > > Sudara > > > > On May 16, 2008, at 10:49 PM, David Clements wrote: > > Hmm... Weird. >> >> Where did you add it? I haven't had to do anything to support both fbml >> and html. Although I just use the default rendering i don't call respond_to >> >> Dave >> >> On May 16, 2008, at 2:34 PM, sudara wrote: >> >> Yes sir. >>> >>> Without it, I get a Mime::Type error. >>> >>> Sudara >>> >>> On May 16, 2008, at 10:17 PM, David Clements wrote: >>> >>> Were you adding this yourself somwhere? >>>> >>>> Dave >>>> >>>> Sent from my iPhone >>>> >>>> On May 16, 2008, at 1:59 PM, sudara wrote: >>>> >>>> Wow, so I'm trippen out. >>>>> >>>>> The answer: >>>>> >>>>> removed: >>>>> Mime::Type.register 'text/html', :fbml >>>>> >>>>> added: >>>>> Mime::Type.register_alias 'text/html', :fbml >>>>> >>>>> Every request works as it now should. >>>>> >>>>> I've been poking around in >>>>> vendor/rails/actionpack/lib/action_controller/mime_type.rb to try and >>>>> determine what the heck would make Firefox behave so uniquely. >>>>> >>>>> Then again, I should have register_alias'd to begin with, no? >>>>> >>>>> Funny thing is, it was working like a breeze until Firefox 3. Must have >>>>> *something* to do with the accept headers it sends? >>>>> >>>>> anywho, I couldn't find much Documentation about registering the fbml >>>>> alias, but maybe we can throw a gotcha note in there. >>>>> >>>>> Sudara >>>>> >>>>> On May 16, 2008, at 8:12 PM, David Clements wrote: >>>>> >>>>> I confirmed this for you. Firefox 3 returns FBML and Firefox 2 does >>>>>> not. >>>>>> >>>>>> Dave >>>>>> >>>>>> On Fri, May 16, 2008 at 10:03 AM, sudara >>>>>> wrote: >>>>>> Hey there. >>>>>> >>>>>> I prematurely posted. I'm still having this issue, but I unfairly left >>>>>> out the small detail that I'm on Rails 2.1 RC1. >>>>>> >>>>>> I do not have caching enabled, and the logs look absolutely "correct" >>>>>> - That is, there is no difference in incoming params between a request >>>>>> coming from Safari and a request coming from Firefox. What is different is >>>>>> that Firefox triggers the fbml respond_to block. >>>>>> >>>>>> I'm going to investigate a bit more, just thought I would send the >>>>>> message out in the case that someone else has seen this. >>>>>> >>>>>> And actually, this is on a live site - http://alonetone.com/sudara is >>>>>> an example of a page that triggers the fbml layout in Firefox3 >>>>>> >>>>>> Sudara >>>>>> >>>>>> >>>>>> On May 15, 2008, at 5:45 PM, David Clements wrote: >>>>>> >>>>>> Hey Sudara, >>>>>>> >>>>>>> I currently have this implemented for one of my apps and I don't see >>>>>>> this problem in Firefox 3. >>>>>>> >>>>>>> Can you post some code? And the pieces of the log? >>>>>>> >>>>>>> You don't have caching turned on do you? >>>>>>> >>>>>>> Dave >>>>>>> >>>>>>> On Thu, May 15, 2008 at 7:48 AM, sudara >>>>>>> wrote: >>>>>>> Hi there, >>>>>>> >>>>>>> I have a controller that responds to fbml and html, with html at the >>>>>>> top. >>>>>>> >>>>>>> In all browsers, this works as expected - When I'm hitting the >>>>>>> controller from my normal app, I get html. When I hit it inside facebook, I >>>>>>> get fbml. >>>>>>> >>>>>>> However, with Firefox 3 hitting the normal app, I'm getting fbml for >>>>>>> some odd reason. >>>>>>> >>>>>>> Am I crazy? >>>>>>> >>>>>>> Sudara >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sudara at alonetone.com Fri May 16 18:04:12 2008 From: sudara at alonetone.com (sudara) Date: Sat, 17 May 2008 00:04:12 +0200 Subject: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> <6EC054BD-A2DF-49DC-BB28-E935C0815A35@gmail.com> Message-ID: <56C0CF4C-50E8-4006-8FF7-FA9DF2607AC3@alonetone.com> Wow! Facebooker sets the format based on the incoming params, saying "ok it is fbml" if it carries familiar facebook params - it makes sense that falling through the controller rails would nail the right format.erb. I like respond_to as an idiom though. I often am responding to html, js, xml, rss and facebook within the same action, preparing instance variables slightly differently for each. It seems that MimeType.register_alias is really built for these kinds of situations, where the actual mime type is the same, but we get the respond_to sugar to organize the controller. thanks for the help! I'm still miffed about the Firefox thing, but heck, it's working now. Sudara On May 16, 2008, at 11:32 PM, David Clements wrote: > This is what I am saying ... I currently use facebooker without > respond_to, I just name my views correctly and it works fine. > > apps.faceboor.com/meemcloud/privacy > > and > > www.meemcloud.com/privacy > > Hit the same action. > > > > I haven't looked into the code yet to see what making this work. I > am not on RC1 though. > > Dave > > > > On Fri, May 16, 2008 at 3:20 PM, sudara wrote: > I'm using respond_to and serving facebook and a normal app from the > same action / controller. > > I added it a long time ago, but I just double checked - without > explicitly adding it the format.fbml calls fail with a MimeType error. > > In fact, I half-assumed this would be in facebooker by now (the > adding of the mime type) since following convention, it basically > allows facebooker to work out of the box with respond_to > > I keep it safely tucked in config/initializers/mime_types.rb > > Sudara > > > > On May 16, 2008, at 10:49 PM, David Clements wrote: > > Hmm... Weird. > > Where did you add it? I haven't had to do anything to support both > fbml and html. Although I just use the default rendering i don't > call respond_to > > Dave > > On May 16, 2008, at 2:34 PM, sudara wrote: > > Yes sir. > > Without it, I get a Mime::Type error. > > Sudara > > On May 16, 2008, at 10:17 PM, David Clements wrote: > > Were you adding this yourself somwhere? > > Dave > > Sent from my iPhone > > On May 16, 2008, at 1:59 PM, sudara wrote: > > Wow, so I'm trippen out. > > The answer: > > removed: > Mime::Type.register 'text/html', :fbml > > added: > Mime::Type.register_alias 'text/html', :fbml > > Every request works as it now should. > > I've been poking around in vendor/rails/actionpack/lib/ > action_controller/mime_type.rb to try and determine what the heck > would make Firefox behave so uniquely. > > Then again, I should have register_alias'd to begin with, no? > > Funny thing is, it was working like a breeze until Firefox 3. Must > have *something* to do with the accept headers it sends? > > anywho, I couldn't find much Documentation about registering the > fbml alias, but maybe we can throw a gotcha note in there. > > Sudara > > On May 16, 2008, at 8:12 PM, David Clements wrote: > > I confirmed this for you. Firefox 3 returns FBML and Firefox 2 does > not. > > Dave > > On Fri, May 16, 2008 at 10:03 AM, sudara wrote: > Hey there. > > I prematurely posted. I'm still having this issue, but I unfairly > left out the small detail that I'm on Rails 2.1 RC1. > > I do not have caching enabled, and the logs look absolutely > "correct" - That is, there is no difference in incoming params > between a request coming from Safari and a request coming from > Firefox. What is different is that Firefox triggers the fbml > respond_to block. > > I'm going to investigate a bit more, just thought I would send the > message out in the case that someone else has seen this. > > And actually, this is on a live site - http://alonetone.com/sudara > is an example of a page that triggers the fbml layout in Firefox3 > > Sudara > > > On May 15, 2008, at 5:45 PM, David Clements wrote: > > Hey Sudara, > > I currently have this implemented for one of my apps and I don't see > this problem in Firefox 3. > > Can you post some code? And the pieces of the log? > > You don't have caching turned on do you? > > Dave > > On Thu, May 15, 2008 at 7:48 AM, sudara wrote: > Hi there, > > I have a controller that responds to fbml and html, with html at the > top. > > In all browsers, this works as expected - When I'm hitting the > controller from my normal app, I get html. When I hit it inside > facebook, I get fbml. > > However, with Firefox 3 hitting the normal app, I'm getting fbml for > some odd reason. > > Am I crazy? > > Sudara > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcoppedge1 at gmail.com Mon May 19 19:37:29 2008 From: jcoppedge1 at gmail.com (J Coppedge) Date: Mon, 19 May 2008 18:37:29 -0500 Subject: [Facebooker-talk] Memcache session store Message-ID: <8e483d6f0805191637w562ab12avaa68d17de021497c@mail.gmail.com> Maybe a newbie question - but I've been unable to find any references to this issue. I have a current facebook app using rfacebook and working on getting it migrated to facebooker. It currently uses memcache for session store, and when I try to fire up the application utilizing facebooker, I receive a session_id invalid message since the session key contains a dash. >From what I can tell session keys with dashes are not valid in memcache - is there a workaround to be able to use memcache session store with facebooker? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kpmeyer at hotmail.com Sat May 24 22:02:55 2008 From: kpmeyer at hotmail.com (Kristian Meyer) Date: Sun, 25 May 2008 12:02:55 +1000 Subject: [Facebooker-talk] Facebooker support for iframe apps Message-ID: Hi Perryn, I am also struggling with getting iframes to work with facebooker. Sorry to be ignorant of how facebooker works, but I am trying to switch from rfacebook. When you say "the validation is only performed if the parameter 'fb_sig_in_canvas' is present"Are you talking about secure_with_facebook_params!, which calls request_is_for_a_facebook_canvas? The only assistance I can give you is a link to a blog post, which talks about your problem, which was some help to me. http://webjazz.blogspot.com/2008/03/gotchas-of-internal-iframe-facebook.html Is using iframes with facebooker a dead end? I am considering using an fbml fb:iframe tag to wrap all my pages instead, but this would be a lot slower on low bandwidth connections and would also mean I would have to do some hacking of link_to to get clicks in the iframe to redirect the facebook frmae. > Hi facebooker-ers, > > It looks to me like facebooker does not currently support iframe > facebook apps - or am I missing something? > > My first problem as I understand it is as follows - When you are > logged into facebook, and access a facebook application, > facebook tacks on a whole lot of extra fb_sig parameters to the > request (including fb_sig_user) that the application can then > validate to authenticate the user. ( via a frustratingly poorly > documented algorithm ) > > I found that for my facebook application that uses an iframe, > facebooker didn't seem to be performing this validation. > > Digging into the code, I found in controller.rb, that the validation > is only performed if the parameter 'fb_sig_in_canvas' is present, > and when the request is for an iframe the parameter 'fb_sig_in_iframe' > is sent instead. > > So, I patched it to also perform the validation in that case as well. > > Does this make any sense? Is this patch something worth submitting? If > so. how should I do that? > > The next problem is that now, with the patch, facebooker validates > these parameters and authenticates the facebook user > placing their credentials in the session, and all proceeds smoothly. > However, if the user logs out of facebook, > their credentials remain in the session and they are left still logged > in to the facebook application. If a second user logs into > facebook and accesses the application, they will be logged in to it as > the first user. > > I'm not sure what to do about this.. any ideas? > > cheers > Perryn _________________________________________________________________ Be part of history. Take part in Australia's first e-mail archive with Email Australia. http://emailaustralia.ninemsn.com.au -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Sat May 24 22:45:49 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Sat, 24 May 2008 21:45:49 -0500 Subject: [Facebooker-talk] Facebooker support for iframe apps In-Reply-To: References: Message-ID: <07523B51-44B5-4D72-9EC6-DBDDF9DD4F35@elevatedrails.com> There aren't many people using facebooker for IFrame applications. We would love to support it better, but will need your help. Can you provide some example parameters along with an exact error message, ideally including a stack trace? Mike On May 24, 2008, at 9:02 PM, Kristian Meyer wrote: > Hi Perryn, > > I am also struggling with getting iframes to work with facebooker. > Sorry to be ignorant of how facebooker works, but I am trying to > switch from rfacebook. When you say > "the validation > is only performed if the parameter 'fb_sig_in_canvas' is present" > Are you talking about secure_with_facebook_params!, which calls > request_is_for_a_facebook_canvas? > > The only assistance I can give you is a link to a blog post, which > talks about your problem, which was some help to me. > > http://webjazz.blogspot.com/2008/03/gotchas-of-internal-iframe-facebook.html > > Is using iframes with facebooker a dead end? I am considering using > an fbml fb:iframe tag to wrap all my pages instead, but this would > be a lot slower on low bandwidth connections and would also mean I > would have to do some hacking of link_to to get clicks in the iframe > to redirect the facebook frmae. > > > > Hi facebooker-ers, > > > > It looks to me like facebooker does not currently support iframe > > facebook apps - or am I missing something? > > > > My first problem as I understand it is as follows - When you are > > logged into facebook, and access a facebook application, > > facebook tacks on a whole lot of extra fb_sig parameters to the > > request (including fb_sig_user) that the application can then > > validate to authenticate the user. ( via a frustratingly poorly > > documented algorithm ) > > > > I found that for my facebook application that uses an iframe, > > facebooker didn't seem to be performing this validation. > > > > Digging into the code, I found in controller.rb, that the validation > > is only performed if the parameter 'fb_sig_in_canvas' is present, > > and when the request is for an iframe the parameter > 'fb_sig_in_iframe' > > is sent instead. > > > > So, I patched it to also perform the validation in that case as > well. > > > > Does this make any sense? Is this patch something worth > submitting? If > > so. how should I do that? > > > > The next problem is that now, with the patch, facebooker validates > > these parameters and authenticates the facebook user > > placing their credentials in the session, and all proceeds smoothly. > > However, if the user logs out of facebook, > > their credentials remain in the session and they are left still > logged > > in to the facebook application. If a second user logs into > > facebook and accesses the application, they will be logged in to > it as > > the first user. > > > > I'm not sure what to do about this.. any ideas? > > > > cheers > > Perryn > > > > Email Australia. Be part of history. Take part in Australia's first > e-mail archive with _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From kpmeyer at hotmail.com Sun May 25 00:22:49 2008 From: kpmeyer at hotmail.com (Kristian Meyer) Date: Sun, 25 May 2008 14:22:49 +1000 Subject: [Facebooker-talk] Facebooker support for iframe apps In-Reply-To: <07523B51-44B5-4D72-9EC6-DBDDF9DD4F35@elevatedrails.com> References: <07523B51-44B5-4D72-9EC6-DBDDF9DD4F35@elevatedrails.com> Message-ID: Hi Mike, I don't have a stack trace or parameters that would be useful, it is more that the behaviour is not compatible with how iframes work. The first unsupported thing for iframes is logging in to the app (or facebook). If your facebooker app is set up as iframe, the login.php or tos.php page will be nested within the original frame, giving a double facebook border. I used code modified from the blog entry I mentioned, (http://webjazz.blogspot.com/2008/03/gotchas-of-internal-iframe-facebook.html), which overrides create_new_facebook_session_and_redirect!, like so: class WorkshopController < ApplicationController ensure_authenticated_to_facebook def create_new_facebook_session_and_redirect! session[:facebook_session] = new_facebook_session render :layout => false, :inline => %Q{} # (:canvas=>"true") end def index @user = session[:facebook_session].user end end This is modified from the 10-minute quick start guide for facebooker. This works around the double frame problem, but once the user clicks on the "Log in to " button, they are taken to my app without the frame. So this is another problem, the user should be taken to apps.facebook.com/. I tried putting changing the call to login_url to login_url(:canvas=>"true"), but this caused an endless loop somehow. I don't understand enough of the facebooker code to fix these problems for iframes. Thanks for any assistance you can provide. > CC: facebooker-talk at rubyforge.org > From: mmangino at elevatedrails.com > To: kpmeyer at hotmail.com > Subject: Re: [Facebooker-talk] Facebooker support for iframe apps > Date: Sat, 24 May 2008 21:45:49 -0500 > > There aren't many people using facebooker for IFrame applications. We > would love to support it better, but will need your help. > > Can you provide some example parameters along with an exact error > message, ideally including a stack trace? > > Mike > > > On May 24, 2008, at 9:02 PM, Kristian Meyer wrote: > > > Hi Perryn, > > > > I am also struggling with getting iframes to work with facebooker. > > Sorry to be ignorant of how facebooker works, but I am trying to > > switch from rfacebook. When you say > > "the validation > > is only performed if the parameter 'fb_sig_in_canvas' is present" > > Are you talking about secure_with_facebook_params!, which calls > > request_is_for_a_facebook_canvas? > > > > The only assistance I can give you is a link to a blog post, which > > talks about your problem, which was some help to me. > > > > http://webjazz.blogspot.com/2008/03/gotchas-of-internal-iframe-facebook.html > > > > Is using iframes with facebooker a dead end? I am considering using > > an fbml fb:iframe tag to wrap all my pages instead, but this would > > be a lot slower on low bandwidth connections and would also mean I > > would have to do some hacking of link_to to get clicks in the iframe > > to redirect the facebook frmae. > > > > > > > Hi facebooker-ers, > > > > > > It looks to me like facebooker does not currently support iframe > > > facebook apps - or am I missing something? > > > > > > My first problem as I understand it is as follows - When you are > > > logged into facebook, and access a facebook application, > > > facebook tacks on a whole lot of extra fb_sig parameters to the > > > request (including fb_sig_user) that the application can then > > > validate to authenticate the user. ( via a frustratingly poorly > > > documented algorithm ) > > > > > > I found that for my facebook application that uses an iframe, > > > facebooker didn't seem to be performing this validation. > > > > > > Digging into the code, I found in controller.rb, that the validation > > > is only performed if the parameter 'fb_sig_in_canvas' is present, > > > and when the request is for an iframe the parameter > > 'fb_sig_in_iframe' > > > is sent instead. > > > > > > So, I patched it to also perform the validation in that case as > > well. > > > > > > Does this make any sense? Is this patch something worth > > submitting? If > > > so. how should I do that? > > > > > > The next problem is that now, with the patch, facebooker validates > > > these parameters and authenticates the facebook user > > > placing their credentials in the session, and all proceeds smoothly. > > > However, if the user logs out of facebook, > > > their credentials remain in the session and they are left still > > logged > > > in to the facebook application. If a second user logs into > > > facebook and accesses the application, they will be logged in to > > it as > > > the first user. > > > > > > I'm not sure what to do about this.. any ideas? > > > > > > cheers > > > Perryn > > > > > > > > Email Australia. Be part of history. Take part in Australia's first > > e-mail archive with _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > _________________________________________________________________ Search for local singles online @ Lavalife - Click here http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D30290&_t=764581033&_r=email_taglines_Search_OCT07&_m=EXT -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh at loki.ws Thu May 29 18:10:21 2008 From: josh at loki.ws (Joshua Szmajda) Date: Thu, 29 May 2008 15:10:21 -0700 Subject: [Facebooker-talk] Railsconf Message-ID: <483F29CD.2060707@loki.ws> So who made it? Are people still interested in getting beer or something? -Josh From chris at cobaltedge.com Thu May 29 18:21:45 2008 From: chris at cobaltedge.com (Christopher Bailey) Date: Thu, 29 May 2008 15:21:45 -0700 Subject: [Facebooker-talk] Railsconf In-Reply-To: <483F29CD.2060707@loki.ws> References: <483F29CD.2060707@loki.ws> Message-ID: <443c240c0805291521t739197b6n8bfe561b582cdc00@mail.gmail.com> I'm here, schedule is already fairly full, but will see how the timing works out. Always good to meet others and see what folks are doing, shoot the breeze, etc. On Thu, May 29, 2008 at 3:10 PM, Joshua Szmajda wrote: > So who made it? Are people still interested in getting beer or something? > -Josh > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Christopher Bailey Cobalt Edge LLC http://cobaltedge.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jnylund at yahoo.com Thu May 29 18:45:27 2008 From: jnylund at yahoo.com (Joel Nylund) Date: Thu, 29 May 2008 15:45:27 -0700 (PDT) Subject: [Facebooker-talk] Railsconf Message-ID: <106006.23588.qm@web50611.mail.re2.yahoo.com> Im here also, sorry I didnt find a time yet, im open most afternoons like 5:30 ish if you guys want to meet for an hour or so and grab a beer. Any locals suggest a good place? red robin is a short walk, they have a bar, but im sure there is a better local place close by. Joel ----- Original Message ---- From: Christopher Bailey To: Joshua Szmajda Cc: facebooker-talk at rubyforge.org Sent: Thursday, May 29, 2008 6:21:45 PM Subject: Re: [Facebooker-talk] Railsconf I'm here, schedule is already fairly full, but will see how the timing works out. Always good to meet others and see what folks are doing, shoot the breeze, etc. On Thu, May 29, 2008 at 3:10 PM, Joshua Szmajda wrote: So who made it? Are people still interested in getting beer or something? -Josh _______________________________________________ Facebooker-talk mailing list Facebooker-talk at rubyforge.org http://rubyforge.org/mailman/listinfo/facebooker-talk -- Christopher Bailey Cobalt Edge LLC http://cobaltedge.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Fri May 30 03:46:51 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 30 May 2008 00:46:51 -0700 Subject: [Facebooker-talk] Railsconf In-Reply-To: <106006.23588.qm@web50611.mail.re2.yahoo.com> References: <106006.23588.qm@web50611.mail.re2.yahoo.com> Message-ID: <20129976-AB86-4BDA-B143-DAAE20EFA215@elevatedrails.com> I'm here too, and talking about Facebook on Friday at 1:50pm. Stop by and say hi! (Then go see Jim Weirich talk, he's excellent) Mike On May 29, 2008, at 3:45 PM, Joel Nylund wrote: > Im here also, sorry I didnt find a time yet, im open most afternoons > like 5:30 ish if you guys want to meet for an hour or so and grab a > beer. Any locals suggest a good place? red robin is a short walk, > they have a bar, but im sure there is a better local place close by. > > Joel > > > ----- Original Message ---- > From: Christopher Bailey > To: Joshua Szmajda > Cc: facebooker-talk at rubyforge.org > Sent: Thursday, May 29, 2008 6:21:45 PM > Subject: Re: [Facebooker-talk] Railsconf > > I'm here, schedule is already fairly full, but will see how the > timing works out. Always good to meet others and see what folks are > doing, shoot the breeze, etc. > > On Thu, May 29, 2008 at 3:10 PM, Joshua Szmajda wrote: > So who made it? Are people still interested in getting beer or > something? > -Josh > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > Christopher Bailey > Cobalt Edge LLC > http://cobaltedge.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com