Passing URL Variables into your Facebook Application

I keep seeing this question asked a lot! With the old Facebook API, passing variables as a query string to an application was tricky! It required using the &next parameter and never seemed to work well since developers never seemed to remember if that actual values being passed needed to be run through URLencode or not. With the new Facebook API all of this has changed. Passing variables into your application is as easy as appending them at the end of your query string!

As long as you are using the Facebook API, simply structure your URL like this:

http://apps.facebook.com/MYAPP/index.php?test=1

In new Facebook, users no longer add applications, they just access them.

allow-access.jpg
After the Allow Access screen, FB will take you to a URL like this one:

http://apps.facebook.com/MYAPP/index.php?test=1&auth_token=5281d280485f115f9197c5318e85e929&installed=1

You'll notice that the query string test=1 is passed along with the URL.  Presto!