添加Like按钮ASP.net [英] Add Like Button ASP.net
问题描述
我是一个新手asp.net开发人员,知道旁边没有关于JavaScript。
I'm a novice asp.net developer and know next to nothing about javascript.
我知道这应该是容易的,但...
I know this should be easy but...
我想我需要一个Facebook的Like按钮添加到一个asp.net(C#)网站。当用户点击,它应该添加到我的网站上引用他们的Facebook墙上 - 如果它第一次把他们带到一个Facebook登录页面这很好。我不知道的Like按钮是这个正确的控制。我已经研究过使用C#的Facebook SDK上codePLEX但没有文档和样本似乎并没有做任何事情。
I think I need to add a Facebook Like button to a asp.net (C#) website. When a user clicks, it should add a reference to my site onto their Facebook wall - if it first takes them to a Facebook login page that's fine. I'm not sure the Like button is the correct control for this. I've looked into using the C# Facebook SDK on codeplex but there's no documentation and the samples don't seem to do anything.
我已经采取了以下code从Facebook的开发站点:
I've taken the following code from the facebook dev site:
<iframe src="http://www.facebook.com/plugins/like.php?href=www.blank.co.uk&layout=standard&show_faces=false&width=450&action=like&font&colorscheme=light&height=35"
scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 200px;
height: 200px;" allowtransparency="true"></iframe>
这似乎并没有这样做,除了增加旁边的文本框中的计数器值什么。
This doesn't seem to do anything except increase the counter value next to the text box.
任何人都可以请告知到implment这个功能最好的办法。如果有使用C#的Facebook SDK,可以是非常有益的,因为它很可能我需要更多的implment Facebook的整合在未来的任何好的文档/教程。
Could anyone please advise best way to implment this functionality. If there's any good documentation / tutorial for using the C# Facebook SDK that could be very helpful since it's likely I'll need to implment more Facebook integration in future.
非常感谢
罗布。
推荐答案
您是否遵循在的 https://developers.facebook.com/docs/reference/plugins/like/ ?
下面是在 IFRAME 作为 http://stackoverflow.com ,只是取默认值:
Here is the iframe for http://stackoverflow.com that just takes the defaults:
<iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fstackoverflow.com&layout=standard&show_faces=true&width=450&action=like&font&colorscheme=light&height=80"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:450px; height:80px;"
allowTransparency="true">
</iframe>
下面是在 XFBML 作为 http://stackoverflow.com ,只是取默认值:
Here is the XFBML for http://stackoverflow.com that just takes the defaults:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="http://stackoverflow.com" show_faces="true" width="450" font=""></fb:like>
这篇关于添加Like按钮ASP.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!