Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iFrame application: How to pass data from URL Query String

I have a Facebook application that has a picture gallery. It's build in Flex 4. I want to allow users to link to a specific image.

How can that be done?

The only way I see this being done is adding a GET var like &my_picture=asd.jpg in the Facebook page URL, but I don't know how to read that from the iFrame.

like image 594
Francisc Avatar asked Dec 09 '22 15:12

Francisc


1 Answers

Yes, you can add a parameter to the querystring for this:

http://app.facebook.com/yourapp?myparam=1234

Then, your app will be called like this:

http://domainwhereyouhostyourapp.com/your_fb_app/index.php?myparam=1234

Some other parameters are passed by facebook as well, most related to auth tokens, etc. They are prefixed by "fb_" to prevent name clashes.

In your index.php (or whatever you are using), read the get parameter you're interested in and pass them to your swf as usual.

like image 198
Juan Pablo Califano Avatar answered May 16 '23 10:05

Juan Pablo Califano