1

我的应用程序在弹出窗口中运行..我正在尝试使其在同一页面中运行

<html xmlns:fb="http://www.facebook.com/2008/fbml">
  <body>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <div id="fb-root"></div>
    <script>
      FB.init({appId: '164563273618405', xfbml: true, cookie: true, oauth: true});

      FB.ui({
        client_id: '164563273618405',
        method: 'oauth',
        scope: 'email,user_birthday,user_about_me,user_status,user_photos,friends_photos,read_stream',
        redirect_uri: 'xxxxxxxx',
        response_type: 'token'
      });
     </script>
  </body>
</html>

当我尝试通过添加 display: page 来使应用程序在页面中运行时,如developers.facebook.com/docs/reference/dialogs/#display 中所述,代码变为

<html xmlns:fb="http://www.facebook.com/2008/fbml">
  <body>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <div id="fb-root"></div>
    <script>
      FB.init({appId: '164563273618405', xfbml: true, cookie: true, oauth: true});

      FB.ui({
        client_id: '164563273618405',
        method: 'oauth',
        display: 'page',
        scope: 'email,user_birthday,user_about_me,user_status,user_photos,friends_photos,read_stream',
        redirect_uri: 'xxxxxxx',
        response_type: 'token'
      });
     </script>
  </body>
</html>

它没有运行。

4

0 回答 0