iFrame应用程序.权限请求?

编程入门 行业动态 更新时间:2024-10-27 01:36:43
本文介绍了iFrame应用程序.权限请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在用户首次单击我的iFrame Facebook应用程序时请求权限.问题是我看到的示例迫使用户单击按钮来加载 www. facebook/authorize.php URL.

I want to request permissions when the user first clicks my iFrame Facebook application. The problem is the examples I have seen force the user to click a button to load the www.facebook/authorize.php URL.

有没有办法在我的应用程序中内嵌authorize.php页面?我以前看过它,但找不到方法.

Is there a way to iframe the authorize.php page in my application? I've seen it done before but can't find out how.

如果我目前正在尝试,它会显示转到Facebook框".我看到的方法会更改href或浏览器上的内容.

If I currently try it, it shows the "go to facebook box". The method I seen changes the href or something on the browser.

有什么想法吗?

推荐答案

我在我的一个iframe应用程序中做了类似的事情(我已经简化了此示例的实际代码)

I do something like this in one of my iframe applications (I've simplified the actual code for this example)

$fbSession = $facebook->getSession(); if ( $fbSession ) { $url = $facebook->getLoginUrl( array( 'canvas' => 1 , 'fbconnect' => 0 , 'req_perms' => 'list,of,perms' , 'display' => 'page' ) ); include( 'redirect.php' ); exit; }

然后 redirect.php

<script type="text/javascript"> top.location.href = '<?php echo $url; ?>'; </script> <p> Not being redirected? <a href="<?php echo $url; ?>" target="_top">Click Here.</a> </p>

更多推荐

iFrame应用程序.权限请求?

本文发布于:2023-10-17 11:01:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1500698.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   权限   iFrame

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!