Facebook的iFrame的应用:如何从URL查询字符串传递数据字符串、数据、Facebook、iFrame

2023-09-08 12:11:05 作者:旧夏浅入梦

我有一个Facebook应用程序,有一个图片库。它是建立在Flex 4中。 我想,以允许用户链接到特定图像。

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.

那怎么可以呢?

我看到这是做的是增加一个GET变种喜欢与放大器的唯一途径。my_picture = asd.jpg在Facebook页面的URL,但我不知道如何读来自iFrame的

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.

推荐答案

是的,你可以添加一个参数的查询字符串的内容:

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

其他的一些参数是通过Facebook的传递,以及,最相关的身份验证令牌等,它们是FB_,以prevent名称冲突pfixed $ P $。

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

在您的index.php(或任何你正在使用),阅读你感兴趣的GET参数并传递给你的SWF和往常一样。

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.

 
精彩推荐
图片推荐