根据我在 Facebook Login Button Vs. OAuth Dialog 中阅读的内容我想要的选择是 facebook 登录按钮,因为我宁愿拥有一个包含 facebook 的网站,而不是围绕 facebook 构建的网站。
更重要的是,在创建我的移动网络应用程序版本时,documentation of changing the display of the webapp说我可以简单地将 &display=wap
添加到我的 OAuth 链接的末尾。由于我正在使用 facebook 登录按钮,我应该编辑什么来将显示更改为 wap 或 touch?
按钮的代码以备不时之需:
<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>
最佳答案
只是你不知道。在您链接到的同一文档中:
<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>
按预期打开对话框(查看文档上的屏幕截图)。
关于php - 当不直接使用 OAuth 对话框时,如何从我的服务器 facebook api 调整 facebook 登录的显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5762060/