Lies! All lies!
I'm working with Facebook for a client and I'm having to learn quite a bit to get not-as-much done.
You see, Facebook just changed (yet again) last week and so few to none of the tutorials online have updated nominature nor screenshots.
To say that the Facebook documentation lacks clarity and consistency is an understatement. Ugh!
Today's lesson: Creating a Canvas and a Tab
First we venture here:
http://apps.facebook.com/developer
Only to be redirected here:
http://www.facebook.com/developers/
Which is just fine, btw.
Canvas
Canvas Page URL: ex_ample_app
http://apps.facebook.com/ex_ample_app
http://apps.facebook.com/ex_ample_app
Where facebook users will go to use your application within facebook.
Do not supply a facebook connect page here.
Do not supply a facebook connect page here.
Canvas Page Callback: http://www.example-app.com/canvas?
Your server will receive a GET request like http://www.example-app.com/canvas?fb_sig_PARAMS=...
You can use FBML here, but the trend is to use iFrames.
My personal prediction is that they will try to move apps entirely to the sites they belong to in favor of FB Connect and then have Tabs replace what used to be apps as to better establish a better, more consistent user experience on FB.
My personal prediction is that they will try to move apps entirely to the sites they belong to in favor of FB Connect and then have Tabs replace what used to be apps as to better establish a better, more consistent user experience on FB.
Profile
Tab Name: Example App
Tab URL: tab
http://apps.facebook.com/ex_ample_app/tab
(This is where I got so frustrated.)
http://apps.facebook.com/ex_ample_app/tab
(This is where I got so frustrated.)
It's not "relative" to your canvas url, it's a parameter appended to your canvas url.
http://www.example-app.com/canvas?tab
Also, you would expect that it would GET the tab url, but it actually POSTs to it!
I believe that the reason it POSTs is that it has a HUGE list of params - which may often exceed the character limit of a normal GET.
Why isn't this in the documentation? I have no idea. Because they're crazy and they already have a PHP library that is saavy to their crazy caveats?
Wireshark and server logs are our friends!
Facebook JS API Library: http://wiki.developers.facebook.com/index.php/JavaScript_Client_Library
This is how you develop an FB app in an iFrame
Facebook Auth for Desktop Apps:
http://lukaszpelszynski.blogspot.com/2009/09/facebook-rest-api-hackers-way.html
Facebook on Merb
http://jeremynicoll.com/2009/8/creating-facebook-iframe-applications-with-merb
http://developers.facebook.com/docs/?u=facebook.joey.FB
Facebook JS API Library: http://wiki.developers.facebook.com/index.php/JavaScript_Client_Library
This is how you develop an FB app in an iFrame
Facebook Auth for Desktop Apps:
http://lukaszpelszynski.blogspot.com/2009/09/facebook-rest-api-hackers-way.html
Facebook on Merb
http://jeremynicoll.com/2009/8/creating-facebook-iframe-applications-with-merb
http://developers.facebook.com/docs/?u=facebook.joey.FB