本文介绍了未捕获的异常:错误:< https://www.facebook.com>的权限被拒绝获取属性Proxy.InstallTrigger的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码从Facebook获取用户数据

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.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代码

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");


        }

我收到错误否则当我检查firebug时,我有以下错误未捕获的异常:错误:获取属性Proxy.InstallTrigger

I get the "error else" and when i check firebug i have the following error "uncaught exception: Error: Permission denied for https://www.facebook.com to get property Proxy.InstallTrigger"

我用Google搜索它并且没有运气的想法..是它与firefox有关,因为我正在使用firefox 8?

I googled for it and there's no luck thought .. Is it aproblem with firefox as i'm using firefox 8 ?

推荐答案

最新的PHP + Javascript SDK示例可在此处找到: - Facebook的后端需要在您的应用上启用oauth2.0,并且可能更容易复制+粘贴正在运行的应用,然后根据您的要求进行调整。

The most up to date PHP + Javascript SDK sample is found here: https://developers.facebook.com/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.

这篇关于未捕获的异常:错误:&lt; https://www.facebook.com&gt;的权限被拒绝获取属性Proxy.InstallTrigger的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 00:38