2011-08-26 127 views
2

我有一個問題來驗證我的Facebook表單。在自定義輸入模糊,我有消息Facebook註冊驗證:權限被拒絕訪問屬性'Arbiter'

權限被拒絕訪問屬性

和驗證不會發生。

這是我的代碼:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> 
<head> 
    <title>Home</title> 
</head> 
<body> 
    <div id="fb-root"></div> 
    <script src="https://connect.facebook.net/en_US/all.js#appId=<?php echo FACEBOOK_APP_ID; ?>&xfbml=1"></script> 

    <fb:registration 
     fields='[ 
       {"name":"name"}, 
       {"name":"first_name"}, 
         {"name":"last_name"}, 
         {"name":"gender"}, 
         {"name":"company", "description":"Company", "type":"text"}, 
         {"name":"address", "description":"Address", "type":"text"}, 
         {"name":"zip_code", "description":"Zip Code", "type":"text"}, 
         {"name":"city", "description":"City", "type":"typeahead", "categories":["city"]}, 
         {"name":"phone", "description":"Phone","type":"text"}, 
         {"name":"mobile_phone", "description":"Mobile Phone","type":"text"}, 
         {"name":"email"}, 
         {"name":"optin", "description":"I may receive communications from Fanpage Booster", "type":"checkbox", "default":"unchecked"}, 
         {"name":"captcha"} 
        ]' 
     redirect-uri="recup.php" width="530" fb_only="true" onvalidate="validate" > 
    </fb:registration> 
    <script> 
     function validate(form) { 
      errors = {}; 
      if (form.company == '') { 
       errors.company = "Company can't be empty !"; 
      } 
      if (form.address == '') { 
       errors.address = "Address can't be empty !"; 
      } 
      if (form.zip_code == '') { 
       errors.zip_code = "Zip Code can't be empty !"; 
      } 
      return errors; 
     } 
    </script> 
</body> 

我看了一眼在Facebook上註冊一些教程,Facebook的文檔,並在此網站的問題,但我沒有看到解決方案或類似的問題...

我該如何解決這個問題?

回答

1

我無法重現該錯誤。我也必須確保重定向-URI設置爲絕對URL,添加關閉html標記,並更改腳本引用是協議不怎麼樣:

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

Facebook的驗證不上模糊工作,它會在表單提交後生效。你在哪裏添加了一個onblur事件?

+0

非常感謝,確實錯誤是腳本引用。 現在,它的工作。而且我不會在'onblur'上綁定任何事件,Facebook就是這樣做的。 – Smaze

3

我面臨同樣的情況,並最終通過使用安全站點(HTTPS)修復它。 即使我指定了無協議腳本引用,它也不能在HTTP中工作。

相關問題