How to pass a parameter like title, summary and image in a Facebook sharer URL

143,383

Solution 1

Looks like Facebook disabled passing parameters to the sharer.

We have changed the behavior of the sharer plugin to be consistent with other plugins and features on our platform.

The sharer will no longer accept custom parameters and facebook will pull the information that is being displayed in the preview the same way that it would appear on facebook as a post from the url OG meta tags.

Here's the URL to the post: https://developers.facebook.com/x/bugs/357750474364812/

Solution 2

The only parameter you need right now is ?u=<YOUR_URL>. All other data will be fetched from page or (better) from your open graph meta tags:

<meta property="og:url"                content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" />
<meta property="og:type"               content="article" />
<meta property="og:title"              content="When Great Minds Don’t Think Alike" />
<meta property="og:description"        content="How much does culture influence creative thinking?" />
<meta property="og:image"              content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />

Example & description here

You can test your page for accordance in the debugger.

Solution 3

This works at the moment (Oct. 2016), but I can't guarantee how long it will last:

https://www.facebook.com/sharer.php?caption=[caption]&description=[description]&u=[website]&picture=[image-url]

Solution 4

It seems that the only parameter that allows you to inject custom text is the "quote".

https://www.facebook.com/sharer/sharer.php?u=THE_URL&quote=THE_CUSTOM_TEXT

Solution 5

On the Developers bugs Facebook site, the last answer about that (parameters with sharer.php), makes me believe it was a bug that was going to be resolved. Am I right?

https://developers.facebook.com/x/bugs/357750474364812/

Ibrahim Faour · · Facebook Platform Team

Apologies for the inconvenience. We aim to update our external reports as soon as we get a resolution on issues. I do understand that sometimes the answer provided may not be satisfying, but we are eager to keep our platform as stable and efficient as possible. Thanks!

Share:
143,383
kamesh
Author by

kamesh

&amp;nbsp&amp;nbsp&amp;nbspAbout Me Designation :Senior Software Engineer Experienced In : Html5, jquery, CSS, php , CodeIgniter, jquery-mobile, phoneGap, C#, Angular, Ionic, NodeJS, MySql-Sequalize, MongoDB-Mongoose and some API integration like (facebook, twitter, worldbank, quandl, linkedin) Interest : Coding, spending time in SO, playing chess, knowledge sharing, learning new things Contacts : LinkedIn, facebook, Google+, [email protected] Success Program : if( $hard_work == dedication &amp;&amp;$sincerity == $patience){ Success; }

Updated on February 04, 2020

Comments

  • kamesh
    kamesh over 4 years

    Question:

    I need to pass my content like title, summary and image in a Facebook sharer URL like this:

     <a id="button"
        href="http://www.facebook.com/sharer.php?
        s=100
        &p[url]=http://myurl.com/overview/sap-talent
        &p[images][0]=http://myurl/images/my_image.png
        &p[title]=mytitle
        &p[summary]=containsummary">
    

    The problem is it's automatically getting some content from the above mentioned URL (http://myurl.com/overview/sap-talent), and I don't know where my title and summary data are gone. Is there another way to share my custom title, summary and image via facebooksharer.php?