未捕获的异常:错误:Permission denied for <https://www.facebook.com>获取
uncaught exception: Error: Permission denied for <https://www.facebook.com> to get property Proxy.InstallTrigger
我有以下代码来获取用户数据的facebook
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'the_app_code_here_but_i_didn't right_it_here',
status : true,
cookie : true,
xfbml : true
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<div class="fb-login-button">Login with Facebook</div>
下面是使用facebook.php类
提取数据的PHP代码$user_data = $this->facebook->getUser();
if(!empty($user_data))
{
$uid = $this->facebook->getUser();
$user = $this->facebook->api('/me');
if(!empty($user)) {
print_r($user_data);
die();
}
else
{
die("error");
}
}
else
{
die("error else");
}
我得到"错误否则",当我检查firebug时,我有以下错误"未捕获的异常:错误:拒绝https://www.facebook.com获得属性代理的权限。InstallTrigger"
我谷歌了一下,没有运气的想法…
最新的PHP + Javascript SDK示例在这里找到:https://developers.facebook.com/blog/post/534/- Facebook的后端需要oauth2.0在你的应用程序上启用,它可能更容易复制+粘贴一个工作的应用程序,然后调整它到你的要求。
相关文章:
- 关于引入外部javascript文件的问题&css通过https
- jquery ajax https调用给出ERR_INSECURE_RESPONSE
- 如何通过安全的https连接在javascript中使用基于soap xml的Web服务
- $https请求的安全性
- https.request ignoring rejectUnauthorized
- web配置http到https重定向异常
- HTML:从http到https发布表单
- Node.js https获取请求ECONNRESET
- 使用application/x-www-form-urlencoded使用node.js在post请求中发送数组
- CasperJS(phantom 1.9.7),从昨天起就无法连接https
- JQuery手机.网站上只有一个https页面
- Javascript for HTTPS
- 验证URL(如果用户使用http:// https:// www)
- 如何模拟点击事件的登录按钮https://www.linkedin.com/
- 验证url没有https:// http://意味着也可以接受,如果url是WWW接受(http和WWW)
- GET https://www.google-analytics.com/ga.js net::ERR_TIMED_OU
- 我可以从中提取任何页面的评论吗https://www.rt.com/使用蟒蛇3
- 在Javascript中使用//www.example.com是否自动选择了http/https协议
- https://www.google-analytics.com/ga.js和https://ssl.google-an
- 正则表达式与或不https / http或www