The default sorting order of the facebook comments plugin is by social status. How do I set the default order to reverse chronological on my web page?
I know there is an option on the top of the plugin. But not all users know about it and the sorting order is confusing.
If you visit https://developers.facebook.com/tools/comments/{Your_app_id}/ and then click the Settings link, it will let you edit the "Sort Comments By" setting.
The choices are:
According to https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions, your webpage must have a tag like
<meta property="fb:app_id" content="{YOUR_APP_ID}" />
.P.S. Unfortunately for me, since I'm using ClickFunnels, adding this tag doesn't seem to have any effect. I would instead need to be in complete control of my webpage (and not use a simplified tool like ClickFunnels).
Just guessing I added
to the div provided by Facebook and it worked nicely. So, loading the pluging with the standard html5 code provided here: https://developers.facebook.com/docs/reference/plugins/comments/
just add the
data-order-by
attribute like this:I was googling a lot without success, so I solved this by some reverse engeneering...
facebook_crazy_url
of that iframe (see step 2). The inserted iframe seems to be the only thing that is needed to run the comments properlyfacebook_crazy_url
&order_by=reverse_time"You cannot change the default sort order of the comments plugin. To achieve something like this, you could retrieve the comments yourself, e.g., using FQL, but then you need to build everything else, too. Or use something like Disqus.
Another option inspired by Jan Turoň's solution:
Of course, you can do this without jQuery.
It loads the comments' frame twice, but it works in all cases without harcoding the iframe's src.