2012-04-16 133 views
0

我的Facebook应用程序出现问题。该应用程序是现场直播,我从Facebook上收到一封电子邮件:在Facebook应用程序中请求特定的用户权限

We've found the following policy violation with your app and you need to address this issue by Tuesday April 17, 2012 at 5:00pm PST or your app may be subject to enforcement action. 

Our policies require that your app has a privacy policy that tells users what user data you are going to use and how you will use, display, share, or transfer that data and you will include your privacy policy URL in the Developer Application (See Platform Policy II.3, http://developers.facebook.com/policy). 

It has come to our attention that your app is missing a privacy policy in the permissions dialogue. Please update the privacy policy URL field in the Developer Application at developers.facebook.com/apps/[YOUR_APP_ID]/auth. Also, please review your app to ensure you are also displaying your privacy policy on your web site or within your app. 

我的应用程序仅使用基本用户信息。

我为基本用户身份验证使用JavaScript SDK,但我不知道如何向用户询问正确的权限。

<div id="fb-root"></div> 
<script> 
window.fbAsyncInit = function() { 
FB.init({ 
    appId  : '[APPID]', // App ID 
    channelUrl : '[URL]', // Channel File 
    status  : true, // check login status 
    cookie  : true, // enable cookies to allow the server to access the session 
    xfbml  : true // parse XFBML 
}); 
var login = false; 
FB.getLoginStatus(function(response) { 
      if (response.status === 'connected') { 
       console.log('connected'); 
       login=true; 
       // the user is logged in and connected to your 
       // app, and response.authResponse supplies 
       // the user's ID, a valid access token, a signed 
       // request, and the time the access token 
       // and signed request each expire 
       var uid = response.authResponse.userID; 
       var accessToken = response.authResponse.accessToken; 
      } 
      else{ 
       FB.login(function(response) { 
       if (response.authResponse) { 
       console.log('Welcome! Fetching your information.... '); 
       FB.api('/me', function(response) { 
        console.log('Good to see you, ' + response.name + '.'); 
        if(login===false) 
        { 
         window.open("http://www.facebook.com/EnergyZuerich/app_332399760133904", "_top"); 
        } 
        //window.location.href=window.location.href; 
        //FB.logout(function(response) { 
        //console.log('Logged out.'); 
        //}); 
       }); 
       } else { 
       console.log('User cancelled login or did not fully authorize.'); 
       }  
      }, {scope: 'email'}); 
      }}); 

// Additional initialization code here 
}; 
    (function() { 
    var e = document.createElement('script'); 
     e.async = true; 
    e.src = document.location.protocol + 
    '//connect.facebook.net/en_US/all.js'; 
    document.getElementById('fb-root').appendChild(e); 
    }()); 
// Load the SDK Asynchronously 
(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> 

任何人都可以帮忙吗?

回答

1

他们的电子邮件清楚地告诉你该怎么做。即为您的隐私政策创建一个可公开访问的URL并更新您的应用程序的URL字段。您可以在管理您的应用程序的Facebook上执行此操作。

+0

哦,我愚蠢......谢谢^^ – MrTouch 2012-04-16 07:44:54

+0

没问题。它发生在我们最好的:) – DeepakKapoor 2012-04-16 07:47:18