Matt Busse

Online news editor in Virginia. Interests: media, tech, blogging, Wordpress, Javascript, PHP, reading, thinking, learning.

Add headlines to Facebook Comment Moderation Tool

Updated April 16, 2012

I have combined this feature and others into a single tool, FCM Enhance. I strongly encourage you to check out FCM Enhance instead!

Original post

Some of the news sites I help manage (NewsAdvance.com, GoDanRiver.com, WSLS.com) have recently switched their commenting system to Facebook comments.

I like it a lot and so far our readers’ reaction is mostly positive.

As a member of the team that moderates comments, though, one thing I don’t like is that in Facebook’s Comment Moderation Tool, the Admin/Moderator View has “Visit Website” links below each comment — but it doesn’t tell you the headlines of the articles the links point to.

You can hover your mouse over the link to see the URL, but in our case it uses our own internal short URLs that have nothing more revealing than an ID number for the article.

I made a script for Firefox and Google Chrome to add article headlines to the “Visit Website” links in the Facebook Comment Moderation Tool.

You can see the added headlines in the screenshot below.

Screenshot:

Facebook Comment Moderation Tool Screenshot

Get the script:

For Firefox users, the Greasemonkey add-on is required.

For Google Chrome users, the Tampermonkey add-on is required (it will not work if installed as a native Chrome user script).

Once you have your browser of choice set up…

Go to Userscripts.org to download the Facebook Comment Moderation Tool Headlines script

Click “Install” in the upper-right corner of that page. You can also see the source code there.

After you’ve got it, go to Facebook’s Comment Moderation Tool and click over to Admin/Moderator View.

You must be in Admin/Moderator View, not Public Comments view, to see the headlines.

After the page loads, the headlines should appear. There may be a delay of a few seconds because the script runs after the page loads, and it has to follow each “Visit Website” link and grab its HTML content.

Technical notes, if you’re interested:

  • The script works by following each “Visit Website” link and grabbing the corresponding page’s first h1 tag. If you are moderating a site where the article’s headline is not in its first h1 tag, you should be aware of two things:
    1. The script might show you something other than the article’s headline
    2. You need to talk to your site’s SEO staff :-)
  • The script works on “Visit Website” links on Facebook’s Comment Moderation Tool but not “View Full Thread” links. This is because the former point to websites the script can follow and grab headlines from; the latter point to Facebook AJAX functions that pop up boxes with more comments in them.
  • The script doesn’t work with Google Chrome because, while Chrome supports userscripts, it does not support the Greasemonkey function that allows the browser to grab pages from another website domain. That feature is on the developers’ list to be implemented but for now this script is Firefox-only, unless you research your own workaround. :-) Update, January 2012: Works in Google Chrome with Tampermonkey!
  • Thanks go to Hellion at the terrific Stack Overflow community of programmers for help working out a problem that came up while writing this script.

Related:

 

Share this post:
    • http://www.facebook.com/profile.php?id=595927965 Jim Riley

      Matt … this is terrific.  Thanks … Jim Riley, TBO.com

    • Johnjones

      Disqus is a good comments system. Probably better than Facebook. 

    • Anonymous

      Matt. Does this work with the latest Comment Moderation Tool? I don’t see “Visit Website” in the tool when using the latest version of the FB tool.

      • http://www.mattbusse.com Matt Busse

        Hi! Are you sure you’re looking in Moderator View, not Public Comments View? There are links at the top to toggle between the two. I see the links…

        • Anonymous

          Thanks, Matt. You’re right I was looking at the public view. Now, I see it.