Facebook的iFrame的应用:如何从URL查询字符串传递数据 [英] Facebook iFrame application: How to pass data from URL Query String

查看:236
本文介绍了Facebook的iFrame的应用:如何从URL查询字符串传递数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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.

这篇关于Facebook的iFrame的应用:如何从URL查询字符串传递数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆