开发者

How do I get the requesting fan page url when a user attempts to access my facebook tab application?

I have a scenario where I have a tab application that will be deployed to various fan pages.

I am looking for a way to get 开发者_运维知识库build the redirect url from the signed request so I know which fan page to redirect to once the user has authorized the app.

Most of the examples show this as a static url in the tab app, but in my instance I am not sure which fan page is providing the link to the tab.

Hope that is clear.

Rabbit


In your tab app you get Signed request.

So you have two things you need to build your redirectURL.

1) PageId

2) AppId

based on these two values and facebook vanity URL you can create redirectURL as follows: https://www.facebook.com/profile.php?id=PAGEID_HERE&sk=app_APPID_HERE replace PAGEID_HERE with pageid and replace APPID_HERE with AppId and you are done.

you can set this URL as ReturnURL property of you app.

app.returnURL= Path generated above.

if(app.autherize) or whatever

I hope this will help.

Regards

Ims

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜