2

如何在我的博客(整个网站)中提取最新的对话,并将最近的 10 条评论显示为来自Disqus的对话摘要?

4

2 回答 2

3

您可以使用 Disqus forums/listPosts API 方法构建最新评论小部件。使用 10 条限制将为您提供整个论坛上的 10 条最新评论。

文档:http ://disqus.com/api/docs/posts/details/

可以在此处找到使用 Disqus API 的一些其他代码示例:https ://github.com/disqus/DISQUS-API-Recipes/

于 2012-11-29T23:03:09.507 回答
2

您可以使用以下脚本来提取最新的对话。

<script type="text/javascript" src="http://funbutlearn.disqus.com/recent_comments_widget.js?num_items=25&hide_avatars=0&avatar_size=40&excerpt_length=200"></script>

只是您需要替换您自己的 Disqus 名称。

如果要使用组合插件,请使用以下脚本

<script type="text/javascript" src="http://funbutlearn.disqus.com/combination_widget.js?num_items=25&hide_mods=0&color=grey&default_tab=recent&excerpt_length=70"></script>

你甚至可以添加一些额外的 CSS 来让它们更漂亮。

于 2013-07-26T17:22:29.040 回答