Facebook“点赞按钮”在具有动态内容的页面上(ajax)
通常,一旦用户点击一次,Facebook 的“点赞按钮”就会停用。但是,假设我有一个加载动态内容的页面(例如图片查看器),并且我希望用户能够喜欢一张图像(可以通过生成的 url 通过自己的链接访问图像),然后继续也像另一个一样,点击一次后按钮不会停用。这可能吗?
谢谢。
Usually the facebook 'like button' deactivates once a user clicks on it once. However, let's say I have a page that loads dynamic content (e.g. a picture viewer), and I want the user to be able to like one images (images my be accessed through their own link via generated url), but then move on to like another one as well, without having the button deactivating after being clicked once. Is this possible?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 JS SDK,您应该销毁现有按钮并创建另一个按钮,但“赞”按钮链接到特定 URL,因此您必须确保您喜欢每个图像的不同 URL。
为什么我的 Facebook Like 按钮坏了? 谈论如何动态点赞按钮。
Using the JS SDK you should destroy the existing button and create another one, but the like button links to a specific URL so you'd have to make sure you were liking a different URL for each image.
Why is my Facebook Like button broken? talks about making dynamic like buttons.