S. Woodside
2008-Mar-12 00:42 UTC
[Facebooker-talk] a way to restrict who can install your app, for private testing
This is something I just cooked up to allow me to restrict temporarily who can access my app, based on an array of UIDs. It''s messy but works. Put at the top of your controller, at the end of your filters. # This filter is only until we open everything up before_filter do |c| acceptable_uids = [''594180515'', ''122612996''] unless acceptable_uids.include? c.get_facebook_session.user.uid RAILS_DEFAULT_LOGGER.debug "my UID = " + c.get_facebook_session.user.uid + " but acceptable_uids = " + acceptable_uids.to_s raise RuntimeError("This isn''t going to work") end end def get_facebook_session @facebook_session end If it deems the user unacceptable, it actually fails with: NoMethodError (undefined method `RuntimeError'' for FacebookController:Class): I don''t know why, I think it''s got something to do with using a block or something. However, it still does what it''s supposed to do, which is prevent anyone not on the list from seeing your app. --simon -- http://simonwoodside.com
Christopher Bailey
2008-Mar-12 03:13 UTC
[Facebooker-talk] a way to restrict who can install your app, for private testing
An alternative is simply to make your app not publicly installable, and to designate certain people as "developers" of the app. You can do this on the app''s settings page on Facebook. That way you don''t have to put code in your app that you have to then take back out, etc. I also tend to leverage the "test" users you can set up. So, while I''m doing my own testing (where only I am looking at the app, or a small set of us), I set up some test users add them as friends, have them add the app, etc., then go mark them as actual test user''s in Facebook, etc. I designate these as "developers" of the app, so they have access. On 3/11/08, S. Woodside <sbwoodside at yahoo.com> wrote:> > This is something I just cooked up to allow me to restrict > temporarily who can access my app, based on an array of UIDs. It''s > messy but works. Put at the top of your controller, at the end of > your filters. > > # This filter is only until we open everything up > before_filter do |c| > acceptable_uids = [''594180515'', ''122612996''] > unless acceptable_uids.include? c.get_facebook_session.user.uid > RAILS_DEFAULT_LOGGER.debug "my UID = " + > c.get_facebook_session.user.uid + " but acceptable_uids = " + > acceptable_uids.to_s > raise RuntimeError("This isn''t going to work") > end > end > def get_facebook_session > @facebook_session > end > > > If it deems the user unacceptable, it actually fails with: > NoMethodError (undefined method `RuntimeError'' for > FacebookController:Class): > > I don''t know why, I think it''s got something to do with using a block > or something. However, it still does what it''s supposed to do, which > is prevent anyone not on the list from seeing your app. > > --simon > > > -- > http://simonwoodside.com > > _______________________________________________ > 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: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080311/6196bab0/attachment.html
S. Woodside
2008-Mar-13 19:56 UTC
[Facebooker-talk] a way to restrict who can install your app, for private testing
I considered both of those options, but I had problems. 1. Developers -- I''m going to have quite a few (maybe 30) people that I know privately testing the app, and I don''t want to make them all developers, wouldn''t that give them access to the app editing/ settings etc. 2. Test users -- I tried this, but since my app developer user isn''t a test user, I found that simple fbml like fb:name wouldn''t work because normal users can''t see test users and vice-versa. Their implementation of test users seems quite terrible. --simon -- http://simonwoodside.com On Mar 11, 2008, at 11:13 PM, Christopher Bailey wrote:> An alternative is simply to make your app not publicly installable, > and to designate certain people as "developers" of the app. You > can do this on the app''s settings page on Facebook. That way you > don''t have to put code in your app that you have to then take back > out, etc. > > > I also tend to leverage the "test" users you can set up. So, while > I''m doing my own testing (where only I am looking at the app, or a > small set of us), I set up some test users add them as friends, > have them add the app, etc., then go mark them as actual test > user''s in Facebook, etc. I designate these as "developers" of the > app, so they have access. > > On 3/11/08, S. Woodside <sbwoodside at yahoo.com> wrote: This is > something I just cooked up to allow me to restrict > temporarily who can access my app, based on an array of UIDs. It''s > messy but works. Put at the top of your controller, at the end of > your filters. > > # This filter is only until we open everything up > before_filter do |c| > acceptable_uids = [''594180515'', ''122612996''] > unless acceptable_uids.include? c.get_facebook_session.user.uid > RAILS_DEFAULT_LOGGER.debug "my UID = " + > c.get_facebook_session.user.uid + " but acceptable_uids = " + > acceptable_uids.to_s > raise RuntimeError("This isn''t going to work") > end > end > def get_facebook_session > @facebook_session > end > > > If it deems the user unacceptable, it actually fails with: > NoMethodError (undefined method `RuntimeError'' for > FacebookController:Class): > > I don''t know why, I think it''s got something to do with using a block > or something. However, it still does what it''s supposed to do, which > is prevent anyone not on the list from seeing your app. > > --simon > > > -- > http://simonwoodside.com > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > Christopher Bailey > Cobalt Edge LLC > http://cobaltedge.com
David Clements
2008-Mar-13 20:02 UTC
[Facebooker-talk] a way to restrict who can install your app, for private testing
I did something like this by setting up a Facebook Group and then validating that the User was in that group. If the user was not in the group then I put up a private beta page. That way I collected session keys for people interested in the application and sent them notifications when I was ready to go live. Dave On Thu, Mar 13, 2008 at 1:56 PM, S. Woodside <sbwoodside at yahoo.com> wrote:> I considered both of those options, but I had problems. > > 1. Developers -- I''m going to have quite a few (maybe 30) people that > I know privately testing the app, and I don''t want to make them all > developers, wouldn''t that give them access to the app editing/ > settings etc. > > 2. Test users -- I tried this, but since my app developer user isn''t > a test user, I found that simple fbml like fb:name wouldn''t work > because normal users can''t see test users and vice-versa. Their > implementation of test users seems quite terrible. > > --simon > > -- > http://simonwoodside.com > > > On Mar 11, 2008, at 11:13 PM, Christopher Bailey wrote: > > > An alternative is simply to make your app not publicly installable, > > and to designate certain people as "developers" of the app. You > > can do this on the app''s settings page on Facebook. That way you > > don''t have to put code in your app that you have to then take back > > out, etc. > > > > > > I also tend to leverage the "test" users you can set up. So, while > > I''m doing my own testing (where only I am looking at the app, or a > > small set of us), I set up some test users add them as friends, > > have them add the app, etc., then go mark them as actual test > > user''s in Facebook, etc. I designate these as "developers" of the > > app, so they have access. > > > > On 3/11/08, S. Woodside <sbwoodside at yahoo.com> wrote: This is > > something I just cooked up to allow me to restrict > > temporarily who can access my app, based on an array of UIDs. It''s > > messy but works. Put at the top of your controller, at the end of > > your filters. > > > > # This filter is only until we open everything up > > before_filter do |c| > > acceptable_uids = [''594180515'', ''122612996''] > > unless acceptable_uids.include? c.get_facebook_session.user.uid > > RAILS_DEFAULT_LOGGER.debug "my UID = " + > > c.get_facebook_session.user.uid + " but acceptable_uids = " + > > acceptable_uids.to_s > > raise RuntimeError("This isn''t going to work") > > end > > end > > def get_facebook_session > > @facebook_session > > end > > > > > > If it deems the user unacceptable, it actually fails with: > > NoMethodError (undefined method `RuntimeError'' for > > FacebookController:Class): > > > > I don''t know why, I think it''s got something to do with using a block > > or something. However, it still does what it''s supposed to do, which > > is prevent anyone not on the list from seeing your app. > > > > --simon > > > > > > -- > > http://simonwoodside.com > > > > _______________________________________________ > > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080313/37889494/attachment.html