2

I am creating a Facebook iframe application, and need to use some $_GET variables. This works fine for the application, using something similar to what is described in this question.

However, when I use the app as a tab inside of a facebook fan page, I can't figure out how to pass the variable, or retrieve it. The URL for the site looks like this:

http://www.facebook.com/pages/(Page Name)/(Page ID)?sk=app_(app ID)

And if I try to simply tack a &var1=val1 to the end it doesn't work (Which I didn't really expect it to...) at all.

Is there a way that I can get to the displayed file, the home.php, in the url so I can tack the get variable onto the end and use it? Right now, there's no way to make it so that a copy-pasted url directs to a specific page inside the application.

Community
  • 1
  • 1
Terrik
  • 546
  • 4
  • 10

1 Answers1

2

You need to pass JSON via the app_data parameter. See https://developers.facebook.com/docs/authentication/signed_request/ for details.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • This seems as if the app_data section of the JSON is a good way to pass the variable on, but it doesn't make it so that the URL is changed in a way that will make a copy-past URL load the correct variable, correct? – Terrik Aug 04 '11 at 20:04