gpt4 book ai didi

c# - 如何将 Facebook 赞按钮集成到我们的 asp.net c# 网站

转载 作者:行者123 更新时间:2023-11-30 15:02:50 25 4
gpt4 key购买 nike

“赞”按钮可让用户与 Facebook 上的 friend 分享您的内容。当用户点击您网站上的“赞”按钮时,用户 friend 的动态消息中会出现一个故事,并带有返回您网站的链接。对吧?

我写了下面的代码,这就像 LIKE 按钮一样,我无法将网站的任何内容分享到 fb 墙页

<script type="text/javascript">
function renderFbLike() {
var parent = document.getElementById('fblikediv');
var child = document.getElementById('fblikeimg');
parent.removeChild(child);

var html2 = "<iframe src=\"http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FVoicent&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=60&appId=258346014244946\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:450px; height:40px;\" allowTransparency=\"true\"></iframe>";
document.getElementById('fblikediv').innerHTML = html2;
}
</script>

</head>

<body>
<div id="fblikediv"><img src="images/fb-like-button.png" id="fblikeimg" onMouseOver="return renderFbLike();"></div>

最佳答案

转到此http://developers.facebook.com/docs/reference/plugins/like/页面,当你输入你想要的参数时,Facebook 会为你的页面生成 html 和 javascript 代码。当您将这些应用到您的页面时,它会起作用

关于c# - 如何将 Facebook 赞按钮集成到我们的 asp.net c# 网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12420049/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com