我收到此错误:
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.
为什么我的网址错了?有人能解释一下这部分吗? thx
更新 我尝试了以下组合:
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 :(得分: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.'
错误消息,因为它必须将 Web OAuth登录设置为是,并且我必须为有效OAuth重定向 URI字段添加网址