Custom title, summary is not working in facebook sharer
Asked Answered
D

1

8

I had links in my website which were working fine but I noticed that these are not working now.

eg : http://www.facebook.com/sharer/sharer.php?s=100&p[url]=http://www.otlcampaign.org/blog/2013/02/04/inconvenient-truth-education-reform&p[images][0]=http://www.otlcampaign.org/sites/default/files/journey-for-justice-mlk-memorial.jpg&p[title]=The+Inconvenient+Truth+of+Education+'Reform'!&p[summary]=Recent+events+have+revealed+how+market-driven+education+policies,+deceivingly+labeled+as+%22reform,%22+are+revealing+their+truly+destructive+effects+on+the+streets+and+in+the+corridors+of+government:

this link was working fine before but its not taking custom title , summary etc. Please help me to resolve this problem.

I'm not using meta tags because there are lot of share buttons which have different title, description, image urls.

I have already gone through existing question on this site but those solutions are obselete. eg Facebook Share doesn't show my description or my thumbnail Any suggestions please.

Dikdik answered 9/1, 2014 at 17:32 Comment(2)
Most likely something on the URL is blocked by Facebook, check if you're including resources from third party sites that those resources can themselves be shared on FacebookCerise
@lgy: I can share those URLs but not with custom title. so there is nothing wrong with that URL. you can check the URL mentioned in example, its not taking the title mentioned in the URLDikdik
J
2

I'm not sure if you're comfortable with using PHP, but have you tried the following?

<?php
       $title=urlencode('Title');
       $url=urlencode('http://www.facebook.com/yourfanpage'); /* Note Personal FB Pages will not work */
       $summary=urlencode('Custom message');
       $image=urlencode('http://www.yourdomain.com/facebookshare/images/customthumbnail.jpg');

?>


<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php echo $title;?>&amp;p[summary]=<?php echo $summary;?>&amp;p[url]=<?php echo $url; ?>&amp;&p[images][0]=<?php echo $image;?>', 'sharer', 'toolbar=0,status=0,width=548,height=325');" target="_parent" href="javascript: void(0)">
                Share our Facebook page!
</a>

From your example, also, I noticed that one of the issues might be the ampersands. You have 100& instead of 100& You will need to double check all of the links for these and the spaces, etc.

Joinville answered 10/5, 2014 at 22:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.