The Next Step after getting the widget into ClearSpring (see The Widget Debacle)is setting up and Facebook application that you link said widget too.
FACEBOOK
New Application:

Click For larger image
Create new application:
Application Name:
name your application. this like the widget naming in the CS console manager- a referral name)
Authentication:

Click for larger image
Post-Authorize callback URL:
My widget was connected to a micorsite with metrics attached to it, so i entered the micorsite URL.
Post-Removal callbakck URL:
I believe this is a redirect URL the user will go to upon removing the Widget from FaceBook. A thank or installing or a pointer to the widgets dev site or support site can be used.
***EDIT:
When a user selects to remove your application they are not sent to the ‘Post-Remove URL’ as they have removed the application and so will have no further contact with it. A POST request will be sent to this address in the background however containing the uid of the leaving user.
This was copied from HERE
Profiles:

Click for larger image
Tab name: Choose a tab name; along the top of your proilfes page you can add tabs to go to things you want ( i dont do this at all so forgive my lack of proper normanclacher). Consider it a sub navigation bar youre adding a menu item too.
Tab URL:
Add the Absolute URL to where your widget lives; on your server.
**** I LEFT THE REST OF THE INPUT AREAS BLANK–ill try and figure this out in the future.
Canvas:

Click for larger image
Canvas Page URL:
This is like choosing a directory/ folder name. Choose a name (no spaces) that will best describe your app. your application and widget will be accessible at this address; http://apps.facebook.com/-YOUR CHOSEN NAME-/ (replace ‘-YOUR CHOSEN NAME-’, with your name)
Canvas CallBack URL:
this is where shit gets a lil Stupid….
this is the address to your page facebook home page: http://yourserver/widget directory/index.php
*** FaceBook-esse.
When setting up your FaceBook application your basically creating a page or set of pages Facebook will suck into its http://apps.facebook.com framework. You will need to set up at least three documents; full disclosure these still confuse me a quite a bit, although were it set up to be a proper Facebook app it may be made clearer).
Facebook uses its own mark up language FBML FaceBook Mark-up Language, as a means to prevent any code conflicts or maliciousness, and to make this as painful as possible.
You will need to make:
- Index.PHP
- xd_receiver.htm
- profiletab.html
- virtualhairtool.html
****Post my code (in a post yet to be completed)
Optional URLs:
Bookmark URL:
You can use the facebook app home page url; http://apps.facebook.com/-your app name/
Post-Authorize Redirect URL:
this is the URL users will be redirected to after authourising the installing of your application/widget. you can use the app URL http://apps.facebook.com/-your.app name/. You may also be able do other things wiht this, but havent investigated any of the possibilities beyond going to the app home page. Upon getting to the app home page the user will see and INSTALL this application button. where they can choose to instal the app so it appears in their profiles left rail.
Canvas Settings:
Render Method: choose FBML- i havent used the iframe situation yet.
Choose SAVE SAVE SAVE.
I didn’t need any of the other settings, so im not any help with them yet.
FACEBOOK Documents:
Directory set-up:
you will need a PHP enabled server, the easiest thing to do is to use the same directory that you have your widget in; it will reduce the chances of snadbox security issues and also make it easier to keep track of al the files that will be talking to eachother and iteracting with faceBook.
sever/widget directory/
widget
fb directory/
xd_receiver.htm
profiletab.html
virtualhairtool.html
lib directory/
php directory/ – contains the facebook php library, which your index.php will need to communicate with. *http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz
In the next post in this series i will try and disect the Facebook files… as best as i can, read with low expectations and you might leave happy.