2015-11-03 71 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字段