使用FaceBook注册表单时出错

时间:2011-09-17 20:10:27

标签: facebook

我尝试使用facebook注册插件,但是我收到了这个错误

'redirect_uri' should be an absolute url.

这是代码:

<html>
    <head>
      <title>My Facebook Registration Page</title>
    </head>
    <body>
      <div id="fb-root"></div>
      <script src="http://connect.facebook.net/en_US/all.js">
      </script>
      <script>
         FB.init({ 
            appId:'125309184237777', cookie:true, 
            status:true, xfbml:true 
         });
      </script>
         <fb:registration
            fields="[{'name':'name'}, {'name':'email'},
            {'name':'favorite_car','description':'What is your favorite car?',
            'type':'text'}]" redirect-uri="index.php">
    </fb:registration>
    </body>
 </html>

1 个答案:

答案 0 :(得分:1)

为redirect-uri输入绝对URL。例如,http://example.com/index.php