Facebook’s tool for checking OGP information had changed its URL and interface. This was my introduction in April 2016. To make it more convenient, I created a bookmarklet for moving from the page being viewed to the debugging screen.
The updated Sharing Debugger screen
The Facebook debugger entry page was the original reference. The saved screenshot has Sharing Debugger, Batch Invalidator and Access Token tabs, with a URL entry field below them.
The dog illustration lower down shows an example of a page becoming a shared card. This was a screen for reviewing information used when sharing.
The shortcut I made for the current page
Copying a URL, opening the tool and pasting it again takes a few steps. This was the link I made to shorten that trip.
Facebook Sharing DebuggerI made it to be placed in the browser’s bookmarks bar and used while viewing the site to be checked. A shorter route to the checking screen would be useful when refreshing OGP information.
Passing a URL and navigating to the tool
The code first reads the current page URL from location.href. It passes that string to encodeURIComponent, appends it after the debugger’s q= parameter, then assigns the resulting address to location.href.
MDN describes encodeURIComponent as encoding a URI component. For example, this makes an & inside the target URL part of the value being passed. Assigning to location.href navigates to the specified URL.
The short code does not edit the article’s OGP tags or press a re-fetch button. It is a shortcut to the checking screen. This 2016 record does not establish whether it still works under the same conditions today.












