Dave, I am building a Facebook application on top of Symfony and I took 
your sfFacebookPlatform plugin as a base and while putting it to real 
use I made several important improvements.

Because this plugin in not just a sfFacebook kind of helper I wanted it 
to do all the heavy facebook lifting and not just a gateway to the 
native Facebook php5 classes.

First I created sfFacebookController for several purposes. First, I had 
to overload the redirect() method to not send status code 302 but rather 
200 with the content for canvas redirection <fb:redirect />. Also the 
erro404 action was sending error code 404 which makes facebook adds it's 
own text under your facebook 404 action which makes it looks bad like 
"please come after several days" :) Now I can define my erro404 and it 
will look exactly as I want it and facebook will not know that it is 404 
at all as it does not need to know anyway. The third reason is that 
there is not point to have helpers for facebook fb_link_to(), 
fb_url_to() and all that depend on them when we can simply change 
genUrl() in sfFacebookController to achieve that effect on the stock. 
The reasoning is that in my facebook application I use pretty much 100% 
of the time fb_* as I do not want to redirect to a different location 
but the facebook application. All those fb_* functions did not make sense.

In the FBML helper I created fb_include_title(), 
fb_include_javascripts() fb_include_stylesheets(). In order to update 
the application title you need to send <fb:title> and not a 
<title></title>. Also all javascripts and stylesheets must be inline and 
not external files so the stock helper functions do not do much help in 
a Facebook application context. I have not fully finished 
fb_include_stylesheets() and fb_include_javascripts() but you get the idea.

I made some changes to the sfFacebookFilter also, you will see what they 
are from the source code. There may be some other changes so looking at 
the diff will make the most sense.

I am putting the diff here: http://pastie.caboo.se/106830

I have write privileges so I can commit the changes but I am not sure if 
you are using the current plugin as it is and I did not want to 
"happily" surprise you. So either give me a heads up to commit them or 
otherwise :)

Best,
Kupo


Dave Dash wrote:
> Mat,
>
> If you get a chance or are making another app, look at 
> sfFacebookPlatformPlugin, specifically the helpers.  I wrote some 
> voodoo code to get the routing the way Facebook needs it, I'm just 
> curious to have another facebook developer review it.
>
> -d
>
> On 8/5/07, *Mat* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> 
> wrote:
>
>
>     Well I can assure you it is made with symfony! It was quite a
>     challenge
>     getting the two to play nicely :), especially the routing system,
>     but once
>     the initial integration problems were solved symfony performed
>     fantastically.
>
>     Mat
>
>     -----Original Message-----
>     From: Haris Zukanovic' [mailto:[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>]
>     Sent: 05 August 2007 21:26
>     To: symfony-users@googlegroups.com
>     <mailto:symfony-users@googlegroups.com>
>     Subject: [symfony-users] Re: New Symfony Facebook Application
>
>
>     I can't be sure... Just a feeling... can be 100% wrong
>
>
>     Mat wrote:
>     > Yes entirely :)
>     >
>     > Out of interest what made you think it wasn't?
>     >
>     > Mat
>     >
>     > -----Original Message-----
>     > From: Haris Zukanovic' [mailto:[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>]
>     > Sent: 05 August 2007 21:10
>     > To: symfony-users@googlegroups.com
>     <mailto:symfony-users@googlegroups.com>
>     > Subject: [symfony-users] Re: New Symfony Facebook Application
>     >
>     >
>     > Is this really made with symfony?
>     >
>     > Mat wrote:
>     >
>     >> Hi everyone,
>     >>
>     >> Firstly thankyou for all the support everyone has given me,
>     both in the
>     >> google group and on #symfony. I finally just released my first
>     symfony
>     >> website/application, Sponsor-Me. You can find it at
>     >> http://apps.facebook.com/sponsor-me/
>     >>
>     >> I have to say it has been fantastic to develop with symfony and
>     would
>     have
>     >> been impossible without such a flexible framework! Thanks Guys.
>     >>
>     >> Any positive or negative comments are most welcome, and I would
>     highly
>     >> appreciate any feedback people can give.
>     >>
>     >> Thanks,
>     >> Mat
>     >>
>     >>
>     >>
>     >>
>     >>
>     >
>     >
>     >
>     >
>     >
>     > >
>     >
>
>
>
>
>
>     reviewsby.us <http://reviewsby.us>
>     gtalk: dave.dash
>     >


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

Reply via email to