我想在用户首次单击我的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应用程序.权限请求?
发布评论