我需要一个用于XFBML版本的Facebook Like按钮的appId? [英] Do I need an appId for a XFBML version of the Facebook Like button?

查看:154
本文介绍了我需要一个用于XFBML版本的Facebook Like按钮的appId?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很困惑。



我正在使用我网站上一些非常简单的Facebook插件,特别是基本的Like按钮。 / p>

我已经知道如何使用限制版本与iFrame。



但是,现在我试图找出XFBML方法,并且在线文档似乎对您已经知道的内容做了很多假设,并且对工作示例做了简短的说明。例如,它们向您展示如何调用JavaScript Init,并为您提供元素fb的单行HTML代码:like ...但是我看不到任何示例来显示/隐藏面孔,设置默认字体等我喜欢在iFrame代码中。



我以前想到你需要将它们添加为元素的属性,但这是感谢StackOverlfow,不用感谢Facebook文档,只需要你进入圈子。

 < fb:like href =http://mydomain.comshow_faces =trueaction =recommendcolorscheme =lightwidth =400height =35/>好的,所以现在在使用XFBML代码的时候,它的高度会根据被记录而自动扩展/收缩。我不知道我是否应该将高度设置为80,否则会自动发生。



我不知道我应该在Init脚本中用于'你的应用程序id'。没有应用程序...只是一个Facebook公司页面...所以为什么我需要一个应用程序Id,当我只是把一个喜欢的按钮在网站上?

 < script> 
window.fbAsyncInit = function(){
FB.init({
appId:'your app id',
status:true,
cookie:true,
xfbml:true
});
};

对这些问题的任何启发都不胜感激。



谢谢!

解决方案

回答我自己的问题,拉出我所有的头发...



http://developers.facebook.com/docs / guides / web /



JavaScript SDK要求您使用Facebook注册您的网站以获取应用ID (或appId)。appId是您网站的唯一标识符,可确保我们在用户和您的网站之间拥有适当的安全级别。以下示例说明如何在您的appId之后加载JavaScript SDK:



http://开发人员。 facebook.com/setup/



该页/表单的标题是创建应用。我仍然不明白为什么他们不使用更通用的术语。我不是创建应用程序,我不认为我的网站是一个应用程序。


I'm really confused.

I'm trying to use some of the very simple Facebook plugins on my site, specifically the basic "Like" button.

I already know how to use the limited version with an iFrame.

However, now I'm trying to figure out the XFBML method and the online documentation seems to make a lot of assumptions about what you already know and really short on working examples. For example, they show you how to call the JavaScript Init and give you the single line of HTML code for element fb:like... but I could not see any examples of how to show/hide faces, set the default font, etc. like in the iFrame code.

I've since figured out that you need to add them as attributes to the element but that was thanks to StackOverlfow and no thanks to the Facebook documentation which simply takes you in circles.

<fb:like href="http://mydomain.com" show_faces="true" action="recommend" colorscheme="light" width="400" height="35" />

Ok, so now when using the XFBML code, it's height should expand/contract automatically depending on being logged in or not I assume.

I do not know if I'm supposed to initially set the height to "80" or if that happens automatically.

And I have no idea what I'm supposed to use for 'your app id' in the Init script. There is no App... just a Facebook Company Page... so why would I need an App Id when I'm just putting a Like button on a website?

<script>
window.fbAsyncInit = function() {
  FB.init({
    appId: 'your app id',
    status: true,
    cookie: true,
    xfbml: true
  });
};

Any enlightenment on these issues would be appreciated.

Thank-you!

解决方案

Answering my own question, after pulling out all my hair...

http://developers.facebook.com/docs/guides/web/

"The JavaScript SDK requires that you register your website with Facebook to get an App ID (or appId). The appId is a unique identifier for your site that ensures that we have the right level of security in place between the user and your website. The following example shows how to load the JavaScript SDK once you have your appId:"

http://developers.facebook.com/setup/

The title of that page/form is Create an App. I still don't understand why they don't use more generic terminology. I'm not "creating an app" and I don't consider my website to be an app.

这篇关于我需要一个用于XFBML版本的Facebook Like按钮的appId?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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