XFBML和Facebook登录按钮 [英] XFBML and the Facebook Login button

查看:93
本文介绍了XFBML和Facebook登录按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

还在努力让Facebook登录我的网站。我正在尝试添加您在许多网站上看到的使用Facebook登录按钮,并希望使用他们概述的方法此处此处

Still trying to work Facebook login to my website. I'm trying to add the "Login using Facebook" button that you see on many sites and want to use the methods they outline here and here.

但是,我不认为我这样做是正确的。在我的网站顶部,我的标题是:

However, I don't think I'm doing this correctly. At the top of my site, my header reads:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">

就像他们在我发布的第二个链接中指出一样。

Just like they indicate in the second link I posted.

他们说要使用以下代码来连接使用Facebook按钮(显示在第一个链接中(APP_ID是故意的......我的代码使用我的应用ID):

They say to use the following code to have the Connect using Facebook button (which is shown in the first link (APP_ID is there intentionally... my code DOES use my app ID):

<script src="http://connect.facebook.net/en_US/all.js"></script>
  <script>
     FB.init({ 
        appId:'APP_ID', 
        cookie:true, 
        status:true, 
        xfbml:true 
     });
  </script>
  <fb:login-button>Login with Facebook</fb:login-button>

但是当我在我的网站上使用此代码时,无法看到使用Facebook登录按钮。我在这里做错了什么?

But when I use this code on my site the Login with Facebook button is nowhere to be seen. What am I doing wrong here?

推荐答案

< div id =fb-root>< / div> 似乎是缺少链接

这篇关于XFBML和Facebook登录按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆