2015-11-03 78 views
1

我收到此錯誤:設置網站網站網址爲Facebook PHP應用程序問題

Given URL is not allowed by the Application configuration: One or more of 
the given URLs is not allowed by the App's settings. It must match the 
Website URL or Canvas URL, or the domain must be a subdomain of one of the 
App's domains. 

這是我如何設置自己的網站網址: enter image description here

爲什麼我的網址錯了嗎?有人能解釋我這部分嗎? THX

UPDATE 我嘗試了以下組合:

http://attila-naghi.com/facebook/mytest/ 
http://attila-naghi.com/facebook/mytest 
http://attila-naghi.com/facebook/mytest/index.php 
http://www.attila-naghi.com/facebook/mytest/ 
http://www.attila-naghi.com/facebook/mytest 
http://www.attila-naghi.com/facebook/mytest/index.php 

,但我仍然得到錯誤。

+0

http://stackoverflow.com/questions/16345777/given-url-is-not-allowed-by-the-application-configuration –

+0

相信我我已經檢查過第一頁從谷歌從stackoverflow和我還沒有找到解決辦法 – Chester

+0

我相信你因此沒有標記爲可能重複的問題;) –

回答

0

出現錯誤是因爲我沒有正確傳遞'redirect_uri'。我錯過了「.com」部分。因此,它應該是這樣的:

$loginUrl = $facebook->getLoginUrl(array ( 
        'scope' => 'publish_actions,read_stream,user_groups,user_about_me,user_interests', 
        'redirect_uri' => 'http://attila-naghi.com/facebook/mytest/test.php' 
      )); 

'Given URL is not permitted by the Application configuration: One or more of the given URLs is not allowed by the App's settings. To use this URL you must enable Web OAuth Login in your App's settings.'

出現錯誤消息,因爲它必須設置網頁的OAuth登錄我必須添加一個網址爲有效的OAuth重定向 URI字段