天道酬勤,学无止境

Facebook comments plugin - how to sort comments? [closed]

I have FB comments plugin here : www.turie.eu and it works, but sorting is little bit odd. How to get that arrow on the top to access sorting options? Thank you

标签

评论

I have already answered this one at another topic, but i`ll repeat it :)

<div class="fb-comments" data-href="your-website" data-num-posts="5" data-width="638" data-order-by="reverse_time"></div>

So anyway the key thing to set is data-order-by="reverse_time".

Facebook not allowed external sort/order tags or command but im solved easy steps :) http://connect.facebook.net/sk_SK/all.js file editing and running on your local server

Steps

  1. search/find colorscheme:this.getAttribute('colorscheme') in all.js`
  2. change this line order_by:'reverse_time'
  3. save it !

    • If you want other default order just allowed this options reverse_time time social
    • and dont forget to change facebook js address on your comment page

<div id="fb-cont"><script src="http://yourwesite.com/all.js"></script>

I've "solved" it:) Sorting option become automatically available when some comments are added. I have about 13 comments and it works!

Or you can use this direct link

https://www.facebook.com/plugins/comments.php?api_key=APP_ID&channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df185df11ab685b1%26origin%3Dhttp%253A%252F%252FWWW.YOURSITE.COM%252Ff846e27164d9b3%26relation%3Dparent.parent%26transport%3Dpostmessage&href=http%3A%2F%2FWWW.YOURSITE.COM%2FSUBDIRECTORY%2F&locale=tr_TR&numposts=25&sdk=joey&width=470&view_as_moderator=1&controller_id=feedback_1qpSRehzyIefEfw0h&owns_pages=1&command=page&limit=50&offset=0&order_by=reverse_time

Pay attention to WWW.YOURSITE.COM and SUBDIRECTORY between &href=.........&

This forum gave me lots of ideas and work arounds so now I got a chance to pay back a little.

Hope it helps.

The solution of Nemanja works even with fb:comments tag.

Adding data-order-by="reverse_time" as an attribute to the comment box tag allows you to sort the comments by reverse time order.

受限制的 HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。

相关推荐
  • facebook like button 评论框不会在提交时关闭,也不会发布任何内容(facebook like button comment box won't close on submit, and doesn't post anything)
    问题 尝试将 facebook 社交类按钮插件与评论框集成。 喜欢/不喜欢功能工作正常,它正确反映在我在 Facebook 上的活动日志中。 但是,一旦我在评论框中输入评论并单击“发布到 facebook”,就没有任何反应! 我提交时评论框不会关闭,它不会在时间线中发布任何内容。 我可以在 Firefox 调试器中看到 post 请求。 Facebook 调试器不会报告页面上的任何错误,并提取元标记。 请参阅下面的代码:我做错了什么或遗漏了什么? <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml"> <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#"> <meta property="og:title" content="mytitle" /> <meta property="og:description" content="mydescription" /> <meta property="og:type"
  • facebook comments plugin showing only after refresh
    I am trying to use the facebook comments plugin. I have this code, I have added after the opening <body> tag and also tried before de closing </body> like suggested here <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=MY_APP_ID&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> And on the 'show' page I have <div class="fb-comments" data-href="<%=request.original
  • facebook评论插件仅在刷新后显示(facebook comments plugin showing only after refresh)
    问题 我正在尝试使用 facebook 评论插件。 我有这个代码,我在打开<body>标签之后添加了,并且在关闭</body>之前也尝试过,就像这里建议的那样 <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=MY_APP_ID&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> 在“显示”页面上,我有<div class="fb-comments" data-href="<%=request.original_url %>" data-numposts="5" data-colorscheme="light"></div> 问题是插件仅在我刷新页面时显示,而不是在我通过同一站点的链接访问页面时显示。 编辑: 我发现这与
  • How to display recent comments from Facebook Comments social plugin?
    Well, I just have a pretty straight question: How do I display recent comments from Facebook Comments social plugin on my website? I have integrated the facebook comments social plugin on my wordpress blog and I just want to put a widget on my sidebar that displays the recent comments from the social plugin. Thanks!
  • How to be notified of comments posted via the Facebook Comments Social Plugin
    I recently implemented the Facebook social plugin for comments on my blog. I assumed, incorrectly, that I would get a Facebook notification when someone posts a comment to one of my articles. I was wondering if that is a possibility. I have read references to the use of a event.subscribe function in the javascript SDK, but I wasn't really interested in creating a javascript-based notification dingus but would rather just see the little badge in my Facebook notification window. I'd love any insight on how others have addressed this. Thanks in advance!
  • facebook like button comment box won't close on submit, and doesn't post anything
    Trying to integrate a facebook social like button plugin with the comment box. The like/unlike function works fine, and it reflects properly in my activity log on Facebook. However, once I type in a comment in the comment box and click "post to facebook", nothing happens! The comment box won't close when I submit, and it doesn't publish anything in the timeline. I can see the post request in Firefox debugger. Facebook debugger doesn't report any errors on the page, and extracts the meta tags. See my code below: What am I doing wrong or missing? <html xmlns="http://www.w3.org/1999/xhtml" dir=
  • Remove white space beneath Facebook comments plugin
    Take a look at the this link. Scroll down a bit and you should see a Facebook comments plugin with an embedded Google map right beneath it. My problem is, there is a ton of white space between the bottom of the comments plugin and the top of the map. Firebug indicates the white space is at the bottom of the comments plugin (as opposed to the top of the map). However, I can't seem to find a way to eliminate it. I've tried just using relative CSS positioning to move the map up 50 pixels, but then it sits on top of the comments if there happen to be any. Also, if the user has turned FB comments
  • Facebook评论api phonegap(Facebook comment api phonegap)
    问题 有没有人成功地将 Facebook 评论 API (http://developers.facebook.com/docs/reference/plugins/comments/) 包含在他在 android 上的 phonegap 项目中? 我已经成功地为 phonegap (https://github.com/davejohnson/phonegap-plugin-facebook-connect) 实施了 facebook 插件,但它不包含任何评论功能。 我想在我的 android 上的 phonegap 项目中包含 facebook 评论功能。 有人知道怎么做这个吗? 回答1 我的解决方法是将评论插件放在普通网页上,然后在 phonegap 中使用 iframe 来显示它。 回答2 Facebook 插件旨在用于具有公共 URL 的网站。 在 Phonegap 应用程序中,您使用的是 HTML5 运行时,但“页面”作为应用程序内的文件在本地托管,并且没有 URL 可以关闭评论。 换句话说,这是不可能的,您应该考虑以编程方式使用 Graph API 的注释部分:https://developers.facebook.com/docs/reference/api/Comment/
  • 如何将 Facebook 评论从一个站点迁移到另一个站点?(How do I migrate Facebook Comments from one site to another?)
    问题 嗨,我是一个具有以下 ID 的 Facebook 应用程序的所有者:187382088033833。我创建了新网站,我想恢复我在应用程序中发表的旧评论。 例如在这个页面,在旧版本中我得到了很多评论:http://www.youris.com/Environment/Bees/Bees_restored_to_health_in_Italy_after_this_springs_neonicotinoidfree_maize_sowing.kl 为什么现在我看不到旧评论? 你能帮助我吗? 回答1 根据 Facebook Comments Social Plugin 文档,评论与发表评论的页面的 URL 相关联。 迁移到新域,或将您的页面移动到新 URL,而不将您的评论社交插件 URL 设置与过去保持相同,将导致您丢失评论。 我会尝试将您插件上的href设置更改为您正在加载的页面的旧 URL。 如果 Facebook 在呈现评论插件之前尝试验证它的存在,或者如果有人单击发布到他们的新闻提要的链接以便他们被重定向到适当的位置,您可能必须保留该旧页面作为到新页面的重定向。
  • 带有 Rails 4 的 Facebook 评论插件(Facebook comments plugin with rails 4)
    问题 我正在尝试在 rails 4 应用程序上实现 facebook 评论插件。 我按照 Facebook 评论页面上的说明进行操作。 在 body 标签后添加脚本: <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=1397110283902092"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> 在我的视图中添加了显示 div: <%= content_tag :div, '', :class => "fb-comments", "data-href" => request.original_url, "data-numposts" => "5", "data-colorscheme" => "light" %>
  • 是否可以使用带有图形对象ID /图形URL而不是www URL的Facebooks Comments Plugin?(Is it possible to use Facebooks Comments Plugin with Graph Object IDs/Graph URLs rather than www URLs?)
    问题 不久前,我建立了这个: http://www.littlebray.co.uk/photos.aspx 这有点像是Facebook相册画廊的非Facebook部分副本,画廊部分中的照片都是从Page for Little Bray(fb.com/littlebray)上的Facebook相册中提取的,放大后可以为您提供全屏视图像Facebook一样,其中的一些都在适当的位置评论了设施。 您会注意到,尽管此评论部分看上去有点像Facebook插件,但事实并非如此,其原因是,如果我使用Facebooks Comments Plugin,当用户评论网站上的照片或评论时,在同一张照片上(记住照片来自同一来源),它将创建两个不同的评论流,一个在FB上显示,另一个在网站上显示。 使用我的方法,在网站或FB上发布的所有评论都将同时出现在两个地方,因为它们直接注入与照片的对象ID有关的FB图表中。 稍后,我创建了另一个类似的图片库,但是在右边距中使用了Facebook的社交插件“ Comments”来评论照片。 但是这里的区别是这些照片是由网站托管的,而不是Facebook相册对象,因此,另一个网站是这些图像的唯一来源,因此在通过URL进行评论时可以创建FB对象。 但是……这让我开始思考,我的第一个示例仅仅是很多工作,是否可以使用Facebook自己的Social
  • Facebook comments plugin with rails 4
    I am trying to implement facebook comments plugin on a rails 4 App. I followed the instructions on the facebook comments page. Added the scripts after the body tag: <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=1397110283902092"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Added the display div in my view: <%= content_tag :div, '', :class => "fb-comments", "data-href"
  • Is it possible to use Facebooks Comments Plugin with Graph Object IDs/Graph URLs rather than www URLs?
    A little while ago, I built this: http://www.littlebray.co.uk/photos.aspx It's kind of an off-Facebook partial replica of a Facebook photo album gallery, the photos in the gallery section are all pulled from Facebook albums on the Page for Little Bray (fb.com/littlebray) enlarging them gives you a kinda full screen view of them with commenting facilties on the right margin, just like Facebook. You'll notice that, whilst this comment section looks a bit like a Facebook plugin, it isn't, and the reason for this is that if I used Facebooks Comments Plugin, when a user comments on a photo on the
  • Facebook评论插件Angularjs(Facebook comment plugin Angularjs)
    问题 在我的 AngularJS 应用程序中添加 facebook 评论插件时,我遇到了一个奇怪的错误。 应用程序页面的简化结构是 <html ng-app="myapp"> <head> ... </head> <body> <div> ... </div> <div ng-view></div> ... </body> </html> 带有fb评论框的页面在ng-view中加载。 包含fb评论框的页面结构如下 <div id="fb-comment-box> <div class="fb-comments" data-href="http://mydomain.com/page/{{ page.id }}" data-numposts="5" data-colorsheme="light"></div> </div> 该page是来自控制器的 angularjs 范围变量。 当我在浏览器中加载此页面并检查元素时。 它显示了正确的页面 ID,即 data-href 是 data-href = "http://mydomain.com/page/2" 但是在fb评论框下方,Facebook显示以下错误 警告:无法访问 http://mydomain.com/page/%7B%7B%20page.id%7D%7D。 我可以看到 angularJS 范围变量没有绑定。
  • Facebook comment plugin Angularjs
    I am facing a strange error while adding the facebook comment plugin in my AngularJS app. The simplified structure of the app page is <html ng-app="myapp"> <head> ... </head> <body> <div> ... </div> <div ng-view></div> ... </body> </html> The page with fb comment box is loaded in ng-view. The structure of page that contains fb comment box is as follows <div id="fb-comment-box> <div class="fb-comments" data-href="http://mydomain.com/page/{{ page.id }}" data-numposts="5" data-colorsheme="light"></div> </div> The page is angularjs scope variable which comes from controller. When i load this page
  • Trying to load Facebook-Comments plugin in a UIWebView
    I'm trying to view a facebook-comments plugin in a UIWebView on an iPhone application. I began with Facebook's iOS tutorial, where I implemented Single Sign-On. The app delegate takes care of Facebook's Single Sign-on, then redirects me to my single view controller, which displays a title bar and a UIWebView. I load the webview with a local file called "comments.html" which has been added and copied to my bundle/project directory. NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"comments" ofType:@"html"] isDirectory:NO]; NSURLRequest *request = [NSURLRequest
  • 尝试在 UIWebView 中加载 Facebook-Comments 插件(Trying to load Facebook-Comments plugin in a UIWebView)
    问题 我正在尝试在 iPhone 应用程序的 UIWebView 中查看 facebook-comments 插件。 我从 Facebook 的 iOS 教程开始,在那里我实现了单点登录。 应用程序委托负责 Facebook 的单点登录,然后将我重定向到我的单一视图控制器,该控制器显示一个标题栏和一个 UIWebView。 我使用名为“comments.html”的本地文件加载 webview,该文件已添加并复制到我的包/项目目录中。 NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"comments" ofType:@"html"] isDirectory:NO]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView loadRequest:request]; 我的 html 文件是插件实现的基本版本,如在 Facebook 评论插件描述站点生成的那样。 我输入了一个 url,然后点击了“获取代码”。 我拿了他们提供给我的 HTML5 代码,然后把它放在一个 html 文件中 <html> <body> <div id="fb-root"></div> <script>(function(d
  • 如何使Facebook评论框的宽度达到100%?(How to make facebook comment box width 100%?)
    问题 我正在使用此代码在我的页面上放置一个Facebook注释框, <script type="text/javascript"> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=397337283630353"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div class="fb-comments" data-href="https://apps.facebook.com/driftee/" data-num-posts="5" data-width="470" data-colorscheme="dark" style="width: 100% !important;"></div> 但我无法使评论框填充页面的100%。 回答1 您可以通过在HTML页面的样式表中添加CSS类来实现此目的: .fb
  • How to add facebook comment plugin in Gatsby?
    I'm creating a blog site using Gatsby. I am very very new to Gatsby/React. I need some documentation about the facebook comment plugin for Gatsby. Thanks in advance.
  • A simple question about facebook comments plugin
    I'm struggling with a very simple problem. The facebook documentation, as always, didn't give me enough explanation. I attached a facebook comments plugin to my site. And using a callback of "comment.create" event, I can get information of a just-create comment. FB.Event.subscribe('comment.create', function(response) { alert(JSON.stringify(response)); }); The json reponse looks like: {"href":"http://siteaddress.com/page.htm", "commentID":"111122223333" } What I like to do now is to retrieve the data of the single comment with the commentID. Although I expected that the following way should