admin管理员组文章数量:1391995
I have the following code to get user data form 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/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<div class="fb-login-button">Login with Facebook</div>
and here is the php code to pull the data using facebook.php class
$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");
}
I get the "error else" and when i check firebug i have the following error "uncaught exception: Error: Permission denied for to get property Proxy.InstallTrigger"
I googled for it and there's no luck thought .. Is it aproblem with firefox as i'm using firefox 8 ?
I have the following code to get user data form 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/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<div class="fb-login-button">Login with Facebook</div>
and here is the php code to pull the data using facebook.php class
$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");
}
I get the "error else" and when i check firebug i have the following error "uncaught exception: Error: Permission denied for https://www.facebook. to get property Proxy.InstallTrigger"
I googled for it and there's no luck thought .. Is it aproblem with firefox as i'm using firefox 8 ?
Share edited Nov 12, 2011 at 16:33 osos asked Nov 12, 2011 at 16:27 osososos 2,1436 gold badges28 silver badges45 bronze badges 1- 1 Here id a discussion about this userscripts/topics/91081 may be helpful – bilash.saha Commented Nov 12, 2011 at 16:37
1 Answer
Reset to default 3The most up to date PHP + Javascript SDK sample is found here: https://developers.facebook./blog/post/534/ - Facebook's backend requires oauth2.0 enabled on your app and it may be easier to just copy + paste a working app, then tweak it to your requirements.
本文标签:
版权声明:本文标题:php - uncaught exception: Error: Permission denied for <https:www.facebook.com> to get property Proxy.InstallTrigg 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744651474a2617711.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论