开发者

How can I adjust the display of a facebook login from my server facebook api when it is not using the OAuth Dialog directly?

From what I've read in the Facebook Login Button Vs. OAuth Dialog the choice I would like to go with is the facebook login button because I would rather have a site that includes facebook instead of a site built around facebook.

More to the point, when creating my mobile web app version of it, the documentation of changing the display of the webapp says that I can simply add &display=wap to the end of my OAuth link. Since I'm using the facebook login button with the what should I edit to change the display to wap or touch?

The code for the button in case anyone wanted it:

    <html>
    <head>
      <title>My Facebook Login Page</title>
    </head>
    <body>
      <div id="fb-root"></div>
      <script src="http://connect.facebook.net/en_US/all.js"></script>
      <script>
         FB.init({ 
            appId   : '<?php echo $facebook->getAppId(); ?>',
      session : <?php echo json_encode($session); ?>, // don't refetch the session when PHP already has it
      status  : true, // check login status
      cookie  : true, // enable cookies to allow the server to access the session
      xfbml   :开发者_高级运维 true // parse XFBML 
         });
      </script>
      <fb:login-button>Login with Facebook</fb:login-button>
    </body>
 </html>


Simply you don't. In the same document you linked to:

 <html>
    <head>
      <title>My Facebook Login Page</title>
    </head>
    <body>
      <div id="fb-root"></div>
      <script src="http://connect.facebook.net/en_US/all.js"></script>
      <script>
         FB.init({ 
            appId:'YOUR_APP_ID', cookie:true, 
            status:true, xfbml:true 
         });
      </script>
      <fb:login-button>Login with Facebook</fb:login-button>
    </body>
 </html>

Well open the dialog as expected (check the screenshot on the document).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜