简体   繁体   English

facebook fb:移动网络的登录按钮

[英]facebook fb:login-button for mobile web

I'm trying to fb:login-button work for mobile web, a la: http://developers.facebook.com/docs/guides/mobile/ 我正在尝试fb:用于移动网络的登录按钮工作,例如: http : //developers.facebook.com/docs/guides/mobile/

However, I'm not sure where to add this code: &display=touch 但是,我不确定在哪里添加此代码: &display=touch

My FBML is the standard: 我的FBML是标准的:

<fb:login-button autologoutlink='true' perms='user_about_me,email'></fb:login-button>

<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function() {
        FB.init({ appId: 'XXXXXXX', status: true, cookie: true, xfbml: true });
        FB.Event.subscribe('auth.login', function() {
            location.href = "....";
        });
    };
    (function() {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
    } ());
</script>

Any ideas? 有任何想法吗?

I'm pretty certain you're not able to use the FBML tags for mobile web applications. 我敢肯定,您不能将FBML标签用于移动Web应用程序。 At least, they won't accept the display=touch argument. 至少,他们不会接受display=touch参数。

It means you'll need to use the slightly more complex OAuth implementation that they describe on http://developers.facebook.com/docs/guides/mobile/ 这意味着您需要使用它们在http://developers.facebook.com/docs/guides/mobile/上描述的稍微复杂的OAuth实现

It kinda makes sense if you think about it. 如果您考虑一下,这很有道理。 The FBML tags generally rely on popups or overlays, which you can't really be certain will be compatible with all mobile browsers. FBML标签通常依赖于弹出窗口或叠加层,您不能真正确定它们是否与所有移动浏览器兼容。 The OAuth implementation takes you off to a FB page and returns you back to your host site for authentication and authorisation. OAuth实现将您带到FB页面,然后将您返回到您的主机站点进行身份验证和授权。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM