开发者

How can I access GET parameters from a Facebook iframe tab using PHP?

开发者 https://www.devze.com 2023-03-26 12:33 出处:网络
I am creating 开发者_如何学Goa 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.

I am creating 开发者_如何学Goa 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消