Bookmarklet to Convert Mobile Facebook link to Desktop Facebook Link

If you’re on a Desktop browser, it is easy enough to see the Mobile version of a Facebook Link. All one has to do is replace the ‘www‘ in the URL with ‘m‘ and press Enter. However, if one is sent the mobile version of a Facebook link, it is not that straight forward to convert it into the desktop format if you’re surfing on a Desktop browser. The default format of the mobile link that Facebook generates is as follows:

Unfortunately, just changing ‘m’ to ‘www’ will not get you to the desktop version of this Facebook link. Instead, it will give you “This page isn’t available” error. To actually get to the desktop link, it has to be converted into the following format:

The ‘id’ portion of the link became the first number in the above URL, while the ‘story_fbid’ portion of the link became the second number. However, it is painful to do this manually every single time. Since the time I started working on Alt News, I have had to do this exercise numerous times. To make it easier for me and everyone else out there, I created a small bookmarklet that can be dragged to the Bookmark bar.


Drag the above link to your Bookmark bar, and whenever you are stuck with the mobile version of a Facebook post on a Desktop browser, click the above link to instantly convert it into a Desktop Facebook post.

The code for this bookmarklet is as follows:

function getParam(param) {
  var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  for (var i=0;i<url.length;i++) {
         var params = url[i].split("=");
         if(params[0] == param)
          return params[1];
  return false;


The getParam function has been borrowed from here.

Bookmarklet creator at was used to convert the Javascript code into a Bookmarklet.


  1. ขอรหัสเฟซให้หน่อยครับเป็นคนแฮกรหัสเฟสไป

  2. Your writing has a captivating storytelling element that kept me engaged throughout the article. I look forward to learning more. click here for more insights.

  3. Thanks for the great Bookmarklet .
    But I found that this is not working with posts that contain image, because they have a different URL structure.
    Can you create a solution for that too?
    It will be Awesome if you do.
    Thanks a lot

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.