From contact at robl.me Mon Aug 3 14:00:01 2009 From: contact at robl.me (Rob Lacey) Date: Mon, 03 Aug 2009 19:00:01 +0100 Subject: [Facebooker-talk] Redirecting outside Facebook after login Message-ID: <4A7725A1.7010604@robl.me> Hi, I don't know if anyone else has seen this issue. We've just put out application into Very Very Alpha release and I've just noticed that when accessing our application when not logged into Facebook once the login is complete we're redirected to the canvas except its outside of the Facebook Canvas entirely, ie our app returns the page that should embed inside the FB body. I thought it was supposed to redirect to the canvas itself. Something is getting very confused along the way but I don't think its our setup that's doing it as all I can see is an incoming request for the canvas which redirects the user to login, and then the next request is a GET outside of the canvas although I'm not 100% sure. Can anyone else see this issue and know how it might be caused? RobL From ckozus at gmail.com Tue Aug 4 12:00:09 2009 From: ckozus at gmail.com (Carlos Kozuszko) Date: Tue, 4 Aug 2009 13:00:09 -0300 Subject: [Facebooker-talk] Support for Application "Profile" Pages Message-ID: <83dd4ae20908040900p11b8eed9qbad0ed388b1713ad@mail.gmail.com> Does anyone know if facebooker has support for Application "Profile" Pages ? That feature is described here: http://wiki.developers.facebook.com/index.php/Facebook_Pages#Application_.22Profile.22_Pages I only found references to that in this thread: http://rubyforge.org/pipermail/facebooker-talk/2008-January/000065.html But that thread does not have any responses. Has anybody been able to implement this? Any interesting links to share? Thanks in advance! Carlos K. -- http://www.ckozus.com http://www.insignia4u.com From ckozus at gmail.com Tue Aug 4 19:45:29 2009 From: ckozus at gmail.com (Carlos Kozuszko) Date: Tue, 4 Aug 2009 20:45:29 -0300 Subject: [Facebooker-talk] Fwd: Support for Application "Profile" Pages In-Reply-To: <83dd4ae20908040900p11b8eed9qbad0ed388b1713ad@mail.gmail.com> References: <83dd4ae20908040900p11b8eed9qbad0ed388b1713ad@mail.gmail.com> Message-ID: <83dd4ae20908041645i74ca3f56j82bf35ac820bcc43@mail.gmail.com> I've made some changes to the plugin and I have been able to do it: Here's the fork with the changes: http://github.com/ckozus/facebooker One thing though, what do I have to do to run the tests? I don't really know if there are any failing tests with the code I added. I'd like to fix that and add a few ones to test what I did. I'm getting this error when I run rake test: http://pastie.org/571836 Thanks! Carlos K. From mixonic at synitech.com Tue Aug 4 19:51:53 2009 From: mixonic at synitech.com (Matthew Beale) Date: Tue, 04 Aug 2009 19:51:53 -0400 Subject: [Facebooker-talk] Fwd: Support for Application "Profile" Pages In-Reply-To: <83dd4ae20908041645i74ca3f56j82bf35ac820bcc43@mail.gmail.com> References: <83dd4ae20908040900p11b8eed9qbad0ed388b1713ad@mail.gmail.com> <83dd4ae20908041645i74ca3f56j82bf35ac820bcc43@mail.gmail.com> Message-ID: <1249429913.7594.15.camel@localhost> Hi Carlos, Use the mutli_rails gem: sudo gem install multi_rails And run tests against a specific version of Rails: MULTIRAILS_RAILS_VERSION=2.2.2 rake test:multi_rails:one I usually test 2.2.2, 2.3.2, and 2.3.3. Mike says facebooker is good back to 2.1. Let me know if this helps! -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com On Tue, 2009-08-04 at 20:45 -0300, Carlos Kozuszko wrote: > I've made some changes to the plugin and I have been able to do it: > > Here's the fork with the changes: > > http://github.com/ckozus/facebooker > > One thing though, what do I have to do to run the tests? I don't > really know if there are any failing tests with the code I added. I'd > like to fix that and add a few ones to test what I did. > > I'm getting this error when I run rake test: > > http://pastie.org/571836 > > Thanks! > > Carlos K. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From mmangino at elevatedrails.com Wed Aug 5 00:19:42 2009 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Aug 2009 00:19:42 -0400 Subject: [Facebooker-talk] Fwd: Support for Application "Profile" Pages In-Reply-To: <1249429913.7594.15.camel@localhost> References: <83dd4ae20908040900p11b8eed9qbad0ed388b1713ad@mail.gmail.com> <83dd4ae20908041645i74ca3f56j82bf35ac820bcc43@mail.gmail.com> <1249429913.7594.15.camel@localhost> Message-ID: <200D336F-FD30-4E9E-8ED7-96F4C76CD01B@elevatedrails.com> Or just type rake. I can deal with multiple versions if need be. Mike On Aug 4, 2009, at 7:51 PM, Matthew Beale wrote: > Hi Carlos, > > Use the mutli_rails gem: > > sudo gem install multi_rails > > And run tests against a specific version of Rails: > > MULTIRAILS_RAILS_VERSION=2.2.2 rake test:multi_rails:one > > I usually test 2.2.2, 2.3.2, and 2.3.3. Mike says facebooker is good > back to 2.1. Let me know if this helps! > > -- > Matthew Beale :: 607 227 0871 > Resume & Portfolio @ http://madhatted.com > > On Tue, 2009-08-04 at 20:45 -0300, Carlos Kozuszko wrote: >> I've made some changes to the plugin and I have been able to do it: >> >> Here's the fork with the changes: >> >> http://github.com/ckozus/facebooker >> >> One thing though, what do I have to do to run the tests? I don't >> really know if there are any failing tests with the code I added. I'd >> like to fix that and add a few ones to test what I did. >> >> I'm getting this error when I run rake test: >> >> http://pastie.org/571836 >> >> Thanks! >> >> Carlos K. >> _______________________________________________ >> 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 contact at robl.me Wed Aug 5 10:26:27 2009 From: contact at robl.me (Rob Lacey) Date: Wed, 05 Aug 2009 15:26:27 +0100 Subject: [Facebooker-talk] Redirecting outside Facebook after login In-Reply-To: References: <4A7725A1.7010604@robl.me> Message-ID: <4A799693.4050100@robl.me> Thanks for the response Nasir, I upgraded initially and retried and the problem has resolved itself. I think some extra params where being password to login.php I think they included the params from the inital request to my canvas which required the user to be authenticated, which when tacked onto 'next' caused the issueI saw. So we're all good again. No need to use 'ensure_application_is_installed_by_facebook_user' in the end. Cheers RobL http://www.robl.me Nasir Khan wrote: > If you are checking if the "user" is blank and then calling > ensure_authenticated_to_facebook and getting the non canvas template > then use > "ensure_application_is_installed_by_facebook_user" instead. > > Do sync up to the latest release just in case. > > HTH > > On Mon, Aug 3, 2009 at 2:00 PM, Rob Lacey wrote: > > Hi, > > I don't know if anyone else has seen this issue. We've just put > out application into Very Very Alpha release and I've just noticed > that when accessing our application when not logged into Facebook > once the login is complete we're redirected to the canvas except > its outside of the Facebook Canvas entirely, ie our app returns > the page that should embed inside the FB body. I thought it was > supposed to redirect to the canvas itself. Something is getting > very confused along the way but I don't think its our setup that's > doing it as all I can see is an incoming request for the canvas > which redirects the user to login, and then the next request is a > GET outside of the canvas although I'm not 100% sure. > > Can anyone else see this issue and know how it might be caused? > > RobL > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From mixonic at synitech.com Wed Aug 5 17:16:59 2009 From: mixonic at synitech.com (Matthew Beale) Date: Wed, 05 Aug 2009 17:16:59 -0400 Subject: [Facebooker-talk] across controllers issue In-Reply-To: References: Message-ID: <1249507019.8500.80.camel@localhost> Hi Nasir, Can you show us your facebooker.yml file? It's very important to: callback_url: http://www.mysite.com canvas_page: myapp Note the lack of a leading or trailing '/' -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com On Wed, 2009-08-05 at 17:07 -0400, Nasir Khan wrote: > After using new_attack_path(:canvas => false) in the fb_req_choice, I > dont see the additional "my_canvas" in the request but I still see the > additional /. > So now the request that I see is > > http://apps.facebook.com/my_canvas//attack/new > > The // still lead to Bad URI in Rails. > > thx > > > On Wed, Aug 5, 2009 at 1:00 AM, Nasir Khan wrote: > If I use new_resource helper accross controllers - as an > example in a multi friend request from my invitations > controller if I use new_attack_path in the fb_req_choice. like > - facebook rails book section 6.4. > > I get the canvas page appended twice to the call back URL. > > So by the above example when the invited user accepts the > invitation the URL that I get is > > http://apps.facebook.com/my_canvas//my_canvas/attack/new > > Note // between the two my_canvas. The correct URL should be > > http://apps.facebook.com/my_canvas/attac/new > > Looks like Facebooker is adding this. Any ideas? > > When I use the new_attack_path within the Attack controller or > views it works fine. > > Thanks > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From engel_sanchez at yahoo.com Sun Aug 16 22:52:27 2009 From: engel_sanchez at yahoo.com (Engel Sanchez) Date: Sun, 16 Aug 2009 19:52:27 -0700 (PDT) Subject: [Facebooker-talk] Session in application tab? Message-ID: <433435.13059.qm@web36208.mail.mud.yahoo.com> Looking for a discussion of sessions in application tabs, I found this thread: http://rubyforge.org/pipermail/facebooker-talk/2009-January/001522.html What is the best practice when using facebooker to create profile tabs then? Should I just hack something myself as in the thread above or are there helpers available that I have missed in the code? Thanks in advance for any pointers/advice. Engel A. Sanchez ?Do what you love to do and give it your very best. Whether it's business or baseball, or the theater, or any field. If you don't love what you're doing and you can't give it your best, get out of it. Life is too short. You'll be an old man before you know it.? http://evilengel.blogspot.com From jbrubaker at cmu.edu Tue Aug 18 09:49:35 2009 From: jbrubaker at cmu.edu (Jason Brubaker) Date: Tue, 18 Aug 2009 09:49:35 -0400 Subject: [Facebooker-talk] Facebook connect & sessions Message-ID: <4A8AB16F.1050304@cmu.edu> Hi all, I'm trying to get a Rails site up and running with Facebook Connect using facebooker. I've looked through a couple of the tutorials, and I'm wondering if my understanding of how sessions are supposed to work with facebooker & Facebook connect is completely off. I expected the set_facebook_session before_filter to be able to figure out if I'm already logged in to facebook, and create a facebook_session object if so. Then, I could use the facebook_session information to log the user into my site automatically. Is this even a correct way of thinking about how facebooker's facebook_session works? If that's not what it's used for, then what is the purpose of set_facebook_session? Thanks for your help, Jason From engel_sanchez at yahoo.com Tue Aug 18 10:30:38 2009 From: engel_sanchez at yahoo.com (Engel Sanchez) Date: Tue, 18 Aug 2009 07:30:38 -0700 (PDT) Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: <4A8AB16F.1050304@cmu.edu> References: <4A8AB16F.1050304@cmu.edu> Message-ID: <546156.77908.qm@web36204.mail.mud.yahoo.com> Hi Jason. I'm also working on a rails facebooker app and managed to do the basic integration. I found this tutorial very helpful. It helps you set up your facebook connect app and modify your user handling to automatically log you in if you are already in facebook, and also explains how to link your own user accounts with facebook. It uses the restful_authentication plugin, but it should be gooed even if you are using your own authentication code: http://www.madebymany.co.uk/tutorial-for-restful_authentication-on-rails-with-facebook-connect-in-15-minutes-00523 Feel free to contact me directly with questions. I'm no expert, but it's always useful to talk with others working on similar projects. Later! Engel A. Sanchez ?Do what you love to do and give it your very best. Whether it's business or baseball, or the theater, or any field. If you don't love what you're doing and you can't give it your best, get out of it. Life is too short. You'll be an old man before you know it.? http://evilengel.blogspot.com ----- Original Message ---- From: Jason Brubaker To: facebooker-talk at rubyforge.org Sent: Tuesday, August 18, 2009 9:49:35 AM Subject: [Facebooker-talk] Facebook connect & sessions Hi all, I'm trying to get a Rails site up and running with Facebook Connect using facebooker. I've looked through a couple of the tutorials, and I'm wondering if my understanding of how sessions are supposed to work with facebooker & Facebook connect is completely off. I expected the set_facebook_session before_filter to be able to figure out if I'm already logged in to facebook, and create a facebook_session object if so. Then, I could use the facebook_session information to log the user into my site automatically. Is this even a correct way of thinking about how facebooker's facebook_session works? If that's not what it's used for, then what is the purpose of set_facebook_session? Thanks for your help, Jason _______________________________________________ Facebooker-talk mailing list Facebooker-talk at rubyforge.org http://rubyforge.org/mailman/listinfo/facebooker-talk From contact at robl.me Tue Aug 18 11:54:40 2009 From: contact at robl.me (Rob Lacey) Date: Tue, 18 Aug 2009 16:54:40 +0100 Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: <4A8AB16F.1050304@cmu.edu> References: <4A8AB16F.1050304@cmu.edu> Message-ID: <4A8ACEC0.5070807@robl.me> Hi Jason, They work like so. A user visits your site and wants to login they click the Facebook Connect button and one of two things happen. If the user is already logged into Facebook then they are logged into the application otherwise a popup window appears you supply your Facebook user/pass and are logged into the application. The actual process is when you authenticate with Facebook via FacebookConnect a few facebook cookies are generated and those cookies are stored under the hostname of your app www.myfacebookapp.com or whatever. From those cookies Facebooker can generated a Facebooker::Session, which you can use to simply verify if a user is authenticated with Facebook by checking if facebook_session is not nil or even query the Facebook API for user information with 'facebook_session.user.name'. It can't verify that you are already logged into Facebook when you visit your application of the first time however. So you're not automatically logged into any Facebook Connect site by virtue of the fact you're logged into Facebook. I'm not sure that's even possible, and if it was it wouldn't be what user's expect. set_facebook_session is there to create the facebook_session from the the cookies, indeed it is also used in standard FB applications to generate a Facebooker::Session based on post data to your app and also for Desktop applications. I hope that makes sense. Correct me if this isn't completely correct. RobL http://www.robl.me Jason Brubaker wrote: > Hi all, > > I'm trying to get a Rails site up and running with Facebook Connect > using facebooker. I've looked through a couple of the tutorials, and > I'm wondering if my understanding of how sessions are supposed to work > with facebooker & Facebook connect is completely off. > > I expected the set_facebook_session before_filter to be able to figure > out if I'm already logged in to facebook, and create a > facebook_session object if so. Then, I could use the facebook_session > information to log the user into my site automatically. Is this even a > correct way of thinking about how facebooker's facebook_session works? > If that's not what it's used for, then what is the purpose of > set_facebook_session? > > Thanks for your help, > Jason > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From engel_sanchez at yahoo.com Tue Aug 18 12:10:59 2009 From: engel_sanchez at yahoo.com (Engel Sanchez) Date: Tue, 18 Aug 2009 09:10:59 -0700 (PDT) Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: <4A8ACEC0.5070807@robl.me> References: <4A8AB16F.1050304@cmu.edu> <4A8ACEC0.5070807@robl.me> Message-ID: <292648.71584.qm@web36206.mail.mud.yahoo.com> Jason, perhaps you could clarify if you mean when the user visits your application directly going to your site outside of facebook (where Rob's comments below apply), or visit your application within facebook (your app being accessed as a canvas page like a regular non-facebook-connect app), in which case you can automatically log them in. Now, facebook connect app do have indirect access to the facebook domain cookies (they use the facebook domain iframe talking to your cross-domain top level receiver page trick described in the facebook connect docs), so in theory you may be able to log them in like that. In THEORY, I'm only speculating here, sorry. Engel A. Sanchez ?Do what you love to do and give it your very best. Whether it's business or baseball, or the theater, or any field. If you don't love what you're doing and you can't give it your best, get out of it. Life is too short. You'll be an old man before you know it.? http://evilengel.blogspot.com ----- Original Message ---- From: Rob Lacey To: Jason Brubaker Cc: facebooker-talk at rubyforge.org Sent: Tuesday, August 18, 2009 11:54:40 AM Subject: Re: [Facebooker-talk] Facebook connect & sessions Hi Jason, They work like so. A user visits your site and wants to login they click the Facebook Connect button and one of two things happen. If the user is already logged into Facebook then they are logged into the application otherwise a popup window appears you supply your Facebook user/pass and are logged into the application. The actual process is when you authenticate with Facebook via FacebookConnect a few facebook cookies are generated and those cookies are stored under the hostname of your app www.myfacebookapp.com or whatever. From those cookies Facebooker can generated a Facebooker::Session, which you can use to simply verify if a user is authenticated with Facebook by checking if facebook_session is not nil or even query the Facebook API for user information with 'facebook_session.user.name'. It can't verify that you are already logged into Facebook when you visit your application of the first time however. So you're not automatically logged into any Facebook Connect site by virtue of the fact you're logged into Facebook. I'm not sure that's even possible, and if it was it wouldn't be what user's expect. set_facebook_session is there to create the facebook_session from the the cookies, indeed it is also used in standard FB applications to generate a Facebooker::Session based on post data to your app and also for Desktop applications. I hope that makes sense. Correct me if this isn't completely correct. RobL http://www.robl.me Jason Brubaker wrote: > Hi all, > > I'm trying to get a Rails site up and running with Facebook Connect using facebooker. I've looked through a couple of the tutorials, and I'm wondering if my understanding of how sessions are supposed to work with facebooker & Facebook connect is completely off. > > I expected the set_facebook_session before_filter to be able to figure out if I'm already logged in to facebook, and create a facebook_session object if so. Then, I could use the facebook_session information to log the user into my site automatically. Is this even a correct way of thinking about how facebooker's facebook_session works? If that's not what it's used for, then what is the purpose of set_facebook_session? > > Thanks for your help, > Jason > _______________________________________________ > 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 jbrubaker at cmu.edu Tue Aug 18 14:20:42 2009 From: jbrubaker at cmu.edu (Jason Brubaker) Date: Tue, 18 Aug 2009 14:20:42 -0400 Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: <546156.77908.qm@web36204.mail.mud.yahoo.com> References: <4A8AB16F.1050304@cmu.edu> <546156.77908.qm@web36204.mail.mud.yahoo.com> Message-ID: <4A8AF0FA.7090909@cmu.edu> Hi Engel, Thanks for the reply. I have been working from that tutorial -- it's been helpful, but not very specific about WHY things work. I'll definitely keep you in mind if I have a specific question later on. Thanks again, Jason Brubaker Engel Sanchez wrote: > Hi Jason. I'm also working on a rails facebooker app and managed to do the basic integration. I found this tutorial very helpful. It helps you set up your facebook connect app and modify your user handling to automatically log you in if you are already in facebook, and also explains how to link your own user accounts with facebook. It uses the restful_authentication plugin, but it should be gooed even if you are using your own authentication code: > > http://www.madebymany.co.uk/tutorial-for-restful_authentication-on-rails-with-facebook-connect-in-15-minutes-00523 > > Feel free to contact me directly with questions. I'm no expert, but it's always useful to talk with others working on similar projects. Later! > > Engel A. Sanchez > > > ?Do what you love to do and give it your very best. Whether it's business or baseball, or the theater, or any field. If you don't love what you're doing and you can't give it your best, get out of it. Life is too short. You'll be an old man before you know it.? > > > http://evilengel.blogspot.com > > > > ----- Original Message ---- > From: Jason Brubaker > To: facebooker-talk at rubyforge.org > Sent: Tuesday, August 18, 2009 9:49:35 AM > Subject: [Facebooker-talk] Facebook connect & sessions > > Hi all, > > I'm trying to get a Rails site up and running with Facebook Connect using facebooker. I've looked through a couple of the tutorials, and I'm wondering if my understanding of how sessions are supposed to work with facebooker & Facebook connect is completely off. > > I expected the set_facebook_session before_filter to be able to figure out if I'm already logged in to facebook, and create a facebook_session object if so. Then, I could use the facebook_session information to log the user into my site automatically. Is this even a correct way of thinking about how facebooker's facebook_session works? If that's not what it's used for, then what is the purpose of set_facebook_session? > > Thanks for your help, > Jason > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > From jbrubaker at cmu.edu Tue Aug 18 14:22:36 2009 From: jbrubaker at cmu.edu (Jason Brubaker) Date: Tue, 18 Aug 2009 14:22:36 -0400 Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: <4A8ACEC0.5070807@robl.me> References: <4A8AB16F.1050304@cmu.edu> <4A8ACEC0.5070807@robl.me> Message-ID: <4A8AF16C.30202@cmu.edu> Hi Rob, Thank you for the explanation. I'm not sure why I expected that if I was logged into Facebook that I wouldn't have to log into my site (as long as I had previously connected the two). Anyway, your explanation makes a lot of sense, and I appreciate you taking the time to set me straight. Regards, Jason Brubaker Rob Lacey wrote: > Hi Jason, > > They work like so. A user visits your site and wants to login they > click the Facebook Connect button and one of two things happen. If the > user is already logged into Facebook then they are logged into the > application otherwise a popup window appears you supply your Facebook > user/pass and are logged into the application. > > The actual process is when you authenticate with Facebook via > FacebookConnect a few facebook cookies are generated and those cookies > are stored under the hostname of your app www.myfacebookapp.com or > whatever. From those cookies Facebooker can generated a > Facebooker::Session, which you can use to simply verify if a user is > authenticated with Facebook by checking if facebook_session is not nil > or even query the Facebook API for user information with > 'facebook_session.user.name'. > > It can't verify that you are already logged into Facebook when you > visit your application of the first time however. So you're not > automatically logged into any Facebook Connect site by virtue of the > fact you're logged into Facebook. I'm not sure that's even possible, > and if it was it wouldn't be what user's expect. > > set_facebook_session is there to create the facebook_session from the > the cookies, indeed it is also used in standard FB applications to > generate a Facebooker::Session based on post data to your app and also > for Desktop applications. > > I hope that makes sense. Correct me if this isn't completely correct. > > RobL > http://www.robl.me > > > > Jason Brubaker wrote: >> Hi all, >> >> I'm trying to get a Rails site up and running with Facebook Connect >> using facebooker. I've looked through a couple of the tutorials, and >> I'm wondering if my understanding of how sessions are supposed to >> work with facebooker & Facebook connect is completely off. >> >> I expected the set_facebook_session before_filter to be able to >> figure out if I'm already logged in to facebook, and create a >> facebook_session object if so. Then, I could use the facebook_session >> information to log the user into my site automatically. Is this even >> a correct way of thinking about how facebooker's facebook_session >> works? If that's not what it's used for, then what is the purpose of >> set_facebook_session? >> >> Thanks for your help, >> Jason >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > From klochner at gmail.com Tue Aug 18 14:56:38 2009 From: klochner at gmail.com (kevin lochner) Date: Tue, 18 Aug 2009 14:56:38 -0400 Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: <4A8AF16C.30202@cmu.edu> References: <4A8AB16F.1050304@cmu.edu> <4A8ACEC0.5070807@robl.me> <4A8AF16C.30202@cmu.edu> Message-ID: On Aug 18, 2009, at 2:22 PM, Jason Brubaker wrote: > Hi Rob, > > Thank you for the explanation. I'm not sure why I expected that if I > was logged into Facebook that I wouldn't have to log into my site > (as long as I had previously connected the two). Actually, that is the case, rob was talking about the *very* first time you visit the site, and haven't previously approved it. You shouldn't have to click the connect button if you're logged into facebook and have previously approved the connect app. A good demo is the runaround, try logging-in+approving, logging out, logging into facebook and returning: http://www.somethingtoputhere.com/therunaround/ The following explanation could really use a visual diagram, but here's the rough sequence, assuming you're logged into facebook and visit a site that you've previously approved: 1) load page (with FBML) 2) page calls the FB.Facebook.init(api_key,xd_receiver_file) on the client side (use the init_fb_connect helper) 3) the client side knows about the facebook session, but the page has already loaded 4) load new page 5) facebook cookies are set, and facebook_session is available on the server side 6) do whatever you want with the facebook session in your view So the takeaway is that you will auto-login on the 2nd page load. You can automate step 4 with a callback in step 2, for example try including the following somewhere near the bottom of your page: <% init_fb_connect do %> <% if !logged_in? %> <%= "location.reload()"%> <% end %> <% end %> That would do a full page reload if the facebook session is available and the user isn't logged in on the server side, assuming you have a logged_in? helper function. Not the most elegant solution, but this should get you started - add whatever callback you want in the init_fb_connect block. - kevin > Anyway, your explanation makes a lot of sense, and I appreciate you > taking the time to set me straight. > > Regards, > Jason Brubaker > > Rob Lacey wrote: >> Hi Jason, >> >> They work like so. A user visits your site and wants to login they >> click the Facebook Connect button and one of two things happen. If >> the user is already logged into Facebook then they are logged into >> the application otherwise a popup window appears you supply your >> Facebook user/pass and are logged into the application. >> >> The actual process is when you authenticate with Facebook via >> FacebookConnect a few facebook cookies are generated and those >> cookies are stored under the hostname of your app www.myfacebookapp.com >> or whatever. From those cookies Facebooker can generated a >> Facebooker::Session, which you can use to simply verify if a user >> is authenticated with Facebook by checking if facebook_session is >> not nil or even query the Facebook API for user information with >> 'facebook_session.user.name'. >> >> It can't verify that you are already logged into Facebook when you >> visit your application of the first time however. So you're not >> automatically logged into any Facebook Connect site by virtue of >> the fact you're logged into Facebook. I'm not sure that's even >> possible, and if it was it wouldn't be what user's expect. >> >> set_facebook_session is there to create the facebook_session from >> the the cookies, indeed it is also used in standard FB applications >> to generate a Facebooker::Session based on post data to your app >> and also for Desktop applications. >> >> I hope that makes sense. Correct me if this isn't completely correct. >> >> RobL >> http://www.robl.me >> >> >> >> Jason Brubaker wrote: >>> Hi all, >>> >>> I'm trying to get a Rails site up and running with Facebook >>> Connect using facebooker. I've looked through a couple of the >>> tutorials, and I'm wondering if my understanding of how sessions >>> are supposed to work with facebooker & Facebook connect is >>> completely off. >>> >>> I expected the set_facebook_session before_filter to be able to >>> figure out if I'm already logged in to facebook, and create a >>> facebook_session object if so. Then, I could use the >>> facebook_session information to log the user into my site >>> automatically. Is this even a correct way of thinking about how >>> facebooker's facebook_session works? If that's not what it's used >>> for, then what is the purpose of set_facebook_session? >>> >>> Thanks for your help, >>> Jason >>> _______________________________________________ >>> 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 jbrubaker at cmu.edu Tue Aug 18 15:04:16 2009 From: jbrubaker at cmu.edu (Jason Brubaker) Date: Tue, 18 Aug 2009 15:04:16 -0400 Subject: [Facebooker-talk] Facebook connect & sessions In-Reply-To: References: <4A8AB16F.1050304@cmu.edu> <4A8ACEC0.5070807@robl.me> <4A8AF16C.30202@cmu.edu> Message-ID: <4A8AFB30.5080104@cmu.edu> Hi Kevin, Ah, that makes sense. I should have assumed there would be some cookie issues that needed to be worked out on the client side. Thank you for the explanation & code sample! - Jason Brubaker kevin lochner wrote: > On Aug 18, 2009, at 2:22 PM, Jason Brubaker wrote: > >> Hi Rob, >> >> Thank you for the explanation. I'm not sure why I expected that if I >> was logged into Facebook that I wouldn't have to log into my site (as >> long as I had previously connected the two). > > Actually, that is the case, rob was talking about the *very* first > time you visit the site, and haven't previously approved it. You > shouldn't have to click the connect button if you're logged into > facebook and have previously approved the connect app. A good demo is > the runaround, try logging-in+approving, logging out, logging into > facebook and returning: > > http://www.somethingtoputhere.com/therunaround/ > > The following explanation could really use a visual diagram, but > here's the rough sequence, assuming you're logged into facebook and > visit a site that you've previously approved: > > 1) load page (with FBML) > 2) page calls the FB.Facebook.init(api_key,xd_receiver_file) on the > client side (use the init_fb_connect helper) > 3) the client side knows about the facebook session, but the page has > already loaded > 4) load new page > 5) facebook cookies are set, and facebook_session is available on the > server side > 6) do whatever you want with the facebook session in your view > > So the takeaway is that you will auto-login on the 2nd page load. You > can automate step 4 with a callback in step 2, for example try > including the following somewhere near the bottom of your page: > > <% init_fb_connect do %> > <% if !logged_in? %> > <%= "location.reload()"%> > <% end %> > <% end %> > > That would do a full page reload if the facebook session is available > and the user isn't logged in on the server side, assuming you have a > logged_in? helper function. Not the most elegant solution, but this > should get you started - add whatever callback you want in the > init_fb_connect block. > > - kevin > > > >> Anyway, your explanation makes a lot of sense, and I appreciate you >> taking the time to set me straight. >> >> Regards, >> Jason Brubaker >> >> Rob Lacey wrote: >>> Hi Jason, >>> >>> They work like so. A user visits your site and wants to login they >>> click the Facebook Connect button and one of two things happen. If >>> the user is already logged into Facebook then they are logged into >>> the application otherwise a popup window appears you supply your >>> Facebook user/pass and are logged into the application. >>> >>> The actual process is when you authenticate with Facebook via >>> FacebookConnect a few facebook cookies are generated and those >>> cookies are stored under the hostname of your app >>> www.myfacebookapp.com or whatever. From those cookies Facebooker can >>> generated a Facebooker::Session, which you can use to simply verify >>> if a user is authenticated with Facebook by checking if >>> facebook_session is not nil or even query the Facebook API for user >>> information with 'facebook_session.user.name'. >>> >>> It can't verify that you are already logged into Facebook when you >>> visit your application of the first time however. So you're not >>> automatically logged into any Facebook Connect site by virtue of the >>> fact you're logged into Facebook. I'm not sure that's even possible, >>> and if it was it wouldn't be what user's expect. >>> >>> set_facebook_session is there to create the facebook_session from >>> the the cookies, indeed it is also used in standard FB applications >>> to generate a Facebooker::Session based on post data to your app and >>> also for Desktop applications. >>> >>> I hope that makes sense. Correct me if this isn't completely correct. >>> >>> RobL >>> http://www.robl.me >>> >>> >>> >>> Jason Brubaker wrote: >>>> Hi all, >>>> >>>> I'm trying to get a Rails site up and running with Facebook Connect >>>> using facebooker. I've looked through a couple of the tutorials, >>>> and I'm wondering if my understanding of how sessions are supposed >>>> to work with facebooker & Facebook connect is completely off. >>>> >>>> I expected the set_facebook_session before_filter to be able to >>>> figure out if I'm already logged in to facebook, and create a >>>> facebook_session object if so. Then, I could use the >>>> facebook_session information to log the user into my site >>>> automatically. Is this even a correct way of thinking about how >>>> facebooker's facebook_session works? If that's not what it's used >>>> for, then what is the purpose of set_facebook_session? >>>> >>>> Thanks for your help, >>>> Jason >>>> _______________________________________________ >>>> 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 contact at robl.me Thu Aug 20 05:27:30 2009 From: contact at robl.me (Rob Lacey) Date: Thu, 20 Aug 2009 10:27:30 +0100 Subject: [Facebooker-talk] Facebook cookies and cross domain sessions Message-ID: <4A8D1702.3080505@robl.me> Hi, I wonder if can quiz anyone on how to solve a problem. I use our Facebook app to take payments so we have to access our app outside of the Facebook Canvas for a few controllers (and only minimally). We have a system working fine and we have a token based login to ensure its the same user on the external pages. The problem is we want to perform an action, set some flash messages and redirect users back the facebook canvas. The problem being that sessions don't work across both domains. I thought initially it was the difference in domains between http://apps.facebook.com and http://facebook.pledgemusic.com and that's why cookies didn't work. However, it occured to me that since Facebook proxy all requests and deal with maintaining state then its actually Facebook that have their own cookies mechanism built into their proxy setup. So there should be no problem. However I read this morning that cookies are not stored on a per domain basis, rather a per application basis. So in order to get this to work I need to replicate how Facebook store cookies. Perhaps its setting the application id as the domain or something but this feels wrong and just guess work. http://wiki.developers.facebook.com/index.php/Cookies Anyone got any ideas how to do this? Or even check the way the cookies are stored from Facebook's side? Cheers RobL From engel_sanchez at yahoo.com Thu Aug 20 10:29:47 2009 From: engel_sanchez at yahoo.com (Engel Sanchez) Date: Thu, 20 Aug 2009 07:29:47 -0700 (PDT) Subject: [Facebooker-talk] Reminder about the Google group In-Reply-To: <20a86b7a0908200247r703064f5wb353028dcae4c2d7@mail.gmail.com> References: <20a86b7a0908200247r703064f5wb353028dcae4c2d7@mail.gmail.com> Message-ID: <22346.70016.qm@web36208.mail.mud.yahoo.com> Hi Jon. I'm very surprised by this, it was hard finding the right place for questions about this great plugin. Is there a main page for the plugin that would lead you to find this google group? Sources of information about it seem very disconnected. See you in the group! Engel A. Sanchez ?Do what you love to do and give it your very best. Whether it's business or baseball, or the theater, or any field. If you don't love what you're doing and you can't give it your best, get out of it. Life is too short. You'll be an old man before you know it.? http://evilengel.blogspot.com ________________________________ From: Jon Gilbraith To: facebooker-talk at rubyforge.org Sent: Thursday, August 20, 2009 5:47:37 AM Subject: [Facebooker-talk] Reminder about the Google group Just a quick reminder since this list has seen a bit of traffic over the last few days, the main venue for discussion has moved to the Google Group. http://groups.google.com/group/facebooker Cheers, Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: From ckhobbs at gmail.com Fri Aug 28 18:35:18 2009 From: ckhobbs at gmail.com (Chris Hobbs) Date: Fri, 28 Aug 2009 15:35:18 -0700 Subject: [Facebooker-talk] releases Message-ID: <76BD2BA9-3376-494B-B482-531DE88619D8@gmail.com> Does facebooker tag for major releases? I saw a tag from 4/30. Is the master branch always considered to be production ready? Thanks. chris hobbs - ckhsponge