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=http://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.
Actually you can share with custom thumbnail, name, caption and description, just use the following link:
https://www.facebook.com/dialog/feed?app_id=APP_ID&link=URL&picture=THUMBNAIL_URL&name=NAME&description=DESCRIPTION&caption=CAPTION&redirect_uri=REDIRECT_URI
Thanks for your reply Bartłomiej. You are correct that you can specify a custom thumbnail using that method. However, that is using the Facebook Feed Dialog, which is different from the Share Dialog in that the developer must setup a Facebook App ID.
For anyone curious about this technique, you can find all of the available parameters for the Feed Dialog here: https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.2
It turns out the parameters were just renamed. After a bit of guessing, I wrote this little tool: https://apps.lazza.dk/facebook/
Of course feel free to look at the source code to get the new names.
[…] FACEBOOK SHARE DIALOG NO LONGER ACCEPTS CUSTOM PARAMETERS ref : http://okaypl.us/blog/facebook-share-dialog-longer-accepts-custom-parameters/ […]