Facebook Share Dialog No Longer Accepts Custom Parameters
The Facebook share dialog is a service that Facebook provides which makes it easy to share links from a website on a user’s timeline. Essentially it is a webpage hosted by Facebook, which loads the link to be shared, and allows the user to add a comment before posting.
The share dialog URL is:
https://www.facebook.com/sharer/sharer.php
.
To share a link, you append a query parameter “u” as follows:
https://www.facebook.com/sharer/sharer.php?u=https://okaypl.us/
You can see in the screenshot above that the dialog pulls in the page title, description, and thumbnail image automatically.
In the past, web developers were able to customize those elements by adding additional query parameters to the share dialog URL:
p[title]
= Custom Titlep[summary]
= Custom Descriptionp[images][0]
= Custom Thumbnail Image
There are still many page online that describe how to use these additional parameters to customize the share dialog. However, earlier this year Facebook began ignoring all additional parameters beyond the URL to be shared.
All of the shared content is now pulled from the page’s Open Graph tags. For instance if you want to change the title or description, you must edit the page’s og:title
or og:description
meta tags, respectively.
For example, take a look at the Open Graph tags for this site’s home page, and you can see how they correlate to the content pulled into the Facebook Share dialog above:
If you are a developer, you should double check that your pages have proper Open Graph meta tags. For WordPress website, I highly recommend the WordPress SEO plugin, which will do the heavy lifting for you, while still allowing you to customize the tags on a per-page basis.