2011-09-30 108 views
0

我使用Facebook的演示脚本来了解注册插件的系统。我用这个代码:xfbml注册插件验证错误

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml"> 
<head> 
    <title>Home</title> 
</head> 
<body> 

<div id="fb-root"></div> 

<script src="http://connect.facebook.net/en_US/all.js#appId=285180546708&xfbml=1"></script> 

<fb:registration redirect-uri="http://basarozcan.com/store_userdata.php" 
    fields='[{"name":"name"}, 
      {"name":"username","description":"Username","type":"text"}]' 
    onvalidate="validate_async"></fb:registration> 

<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script> 
<script> 
    function validate_async(form, cb) { 
     $.getJSON('validate.php?username=' + form.username, 
    function (response) { 
     if (response.error) { 
      // Username isn't taken, let the form submit 
      cb(); 
     } 
     cb({ username: 'That username is taken' }); 
    }); 
    } 
</script> 

</body> 
</html> 

我打开网页,写用户名,但脚本无法验证用户名和Firebug的显示错误。错误是:

Permission denied to access property 'Arbiter' 
if (p == parent || !p.Arbiter || !p.JSON) { 

我该如何解决这个问题? 感谢

回答

0

我认为你需要使用HTTPS:

<script src="https://connect.facebook.net/en_US/all.js#appId=285180546708&xfbml=1"></script>