Facebook Fixer: Get Rid of App Spam in Your News Feed

If you use Facebook, you’ve no doubt seen countless "popular items" from your networks cluttering up your news feed. You’re probably also tired of countless announcements of movie trivia contests and "likeness tests" too. Worse yet, there’s no setting to remove notifications from your friends’ apps from the news feed, so you’re stuck with a lot of spam in the news feed.

However, I’ve found a way to hide updates from any single Facebook application and at the same time get rid of the useless "popular items" posts. It’s really easy:

Install and use Firefox and Greasemonkey

For this to work, you’ll need to be browsing the Facebook using Firefox (not Internet Explorer), and you’ll need to install Greasemonkey, an add-on for Firefox. Just download and install Firefox from the first link, just like you’d install any other program on your computer.

Open Firefox, go to the second link, and click Install Now. If it says it blocked addons.mozilla.org from installing an add-on, right click on the warning bar and click Allow, then click Install Now again. Restart Firefox, and you’re ready to go.

Getting rid of "Popular Items"

popular items

Simply open this Facebook Defluffer script link and click "Install this script" from the sidebar on the right. Click Install on the popup, and you’re done. Go reload Facebook’s news feed, and you’ll discover that all of the "popular items" posts have vanished.

If that’s all you wanted to do, you can quit now. But if you want to get rid of the annoying applications updates too, there are a few more steps.

Movie ApplicationGetting rid of App Spam

For this to work, you’ve got to get your hands dirty with a little Javascript. Don’t worry, it’s really easy to do.

menuFirst, right click on the monkey head in the system bar on Firefox, in the bottom-right corner of the window.  Click on "Manage User Scripts."

deflufferIn the dialog box that appears, click on the Facebook Defluffer script in the box on the left. Then click on Edit. That should bring up the Facebook Defluffer script in Notepad or the text editor of your choice.

Once you have the script open, select lines 12-15 from the script, copy them, and paste them at line 16. When your finished, the first for loop should look like this:

for(var i = 0; i < links.length; i++) {
    if (links[i].href.indexOf('stories.php?filter=27') != -1) {
	var outer = links[i].parentNode.parentNode;
	toRemove.push(outer);
    }
    if (links[i].href.indexOf('stories.php?filter=27') != -1) {
	var outer = links[i].parentNode.parentNode;
	toRemove.push(outer);
    }
}

So far, so good. Now, take look at what you copied and pasted. What this script does is it finds all of the links on the Facebook page, looks for links that contain "stories.php?filter=27" in them, and removes the sections that contain these links. Since this link appears in every one of the "popular items" stories, it removes all of the "popular items," and nothing else.

MovieAppIconSo, what we need to do is replace the "stories.php?filter=27" with the signature link of the application we want to remove. So, lets get rid of that movie trivia application. Right click on the icon of the offending application in one of the stories in your news feed and click "Copy Link Location." For the movie application, this copies "http://www.facebook.com/stories.php?app_id=2558160538" to the clipboard.

Now, just paste that into the second "if (links..." line in the Greasemonkey script. Delete the "http://www.facebook.com/" part of the link, so that the line looks like:

if (links[i].href.indexOf('stories.php?app_id=2558160538') != -1) {

Save the script and reload Facebook in Firefox. If you did everything right, all the movie trivia application stories from your friends have disappeared from your news feed. Just repeat those steps as needed for any other applications: Copy the lines from "if (links..." to the next "}", paste, copy the application link into the if statement, and remove the http://www.facebook.com/".

For convenience's sake, I've posted a copy of the script that eliminates the Movie application stuff and the "popular items" below:

Facebook Fixer Script

This isn't the first Greasemonkey script to overcome the shortcomings of a web site's design. There are a lot more scripts to explore at userscripts.com, if you're interested. Let me know if there's anything I need to explain better in the comments. In any case, I hope this helps you get more out of Facebook.

One thought on “Facebook Fixer: Get Rid of App Spam in Your News Feed

  1. Pingback: facebook applcation spam — common abnormality