开发者

Facebook authorization within non-facebook iframe without redirecting

I have a facebook application (not written by me, but have some control of its content) and its designed to run as a canvas iframe app, using the new(er) OAuth login stuff. I want to embed it in an external (i.e. non-facebook) iframe , which works fine when authenticated + authorized as its just a page that talks to facebook.

However开发者_运维技巧, when not authenticated + authorized to run the app, obviously it needs to ask for permissions/login. It does this by redirecting to the relevant auth pages, which works if you do top.location.href, but I'd really like to do it within the iframe e.g. using self.location.href . This doesn't seem to be permitted by facebook as instead of redirecting you to the right page you get a facebook logo and a link to bust out of the iframe and go to the auth page, which I don't want to do.

Is it possible to handle the auth stuff within the iframe, and if so, how? Would really appreciate any info on this!


You should use JavaScript framework of facebook-connect that open a pop-up for permissions

Check this tutorial http://thinkdiff.net/facebook/graph-api-javascript-base-facebook-connect-tutorial/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜