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

后端 未结 2 2090
独厮守ぢ
独厮守ぢ 2020-12-30 16:31

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

2条回答
  •  爱一瞬间的悲伤
    2020-12-30 17:31

    What's great also about Facebook is that it carries EVERYTHING after your ../appname/{things-beyond-your-app-name} to you hosted [server] URL... so that even .htaccess can be used. ;)

    Like this...

    http://apps.facebook.com/YOURAPPNAME/a/b/c.htm
    

    For an app that's hosted on my server at:

    http://example.com/APPSHOSTEDPATH/
    

    and by using this one-liner included in my hosted location's .htaccess file in:

    http://example.com/APPSHOSTEDPATH/
    

    where .htaccess file contains (among the other standard) lines...

    I can put something like:

    RewriteRule ^(.*)$ /myRedirectedPath/$1 [L,R=301]
    

    So if the person goes to: http://apps.facebook.com/YOURAPPNAME/a/b/c.htm (as in the above example)

    They'll stay there and they'll be accessing:

    http://example.com/myRedirectedPath/a/b/c.htm
    

    (pretty sweet, eh?) ;)

    Fun stuff... wanted you to know that there's more capability that just $_GET's.

提交回复
热议问题