toggle menu

Post share issue on Facebook

Govind Ramchander |15 Mar at 12:03

I am facing issues when sharing post on facebook. Facebook is randomly selecting images, title and descripton. I googled and tried some solutions but all those solutions did not work in my case. Those was working perfect for single post page but i have multiple posts listing on a single page. 

need help.

  • 1 like
  • 5 comments

Kaustubh Luthra28 Mar at 12:03

try this

<a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank">
Share on Facebook
</a>

Replace the example.org with your post url.

paste this anchor tag where you want to display facebook share button
or if you have posts listed using loop then paste it within loop. I think it should work.

Govind Ramchander28 Mar at 12:03

Thanks Kaustubh Luthra but it didn't work for me. Random title, description, image are being posting using this solution.

Chetan Tushar28 Mar at 01:03

I am facing the same issue with my project. Anyone please help.

Sandeep Navaneet Saklani28 Mar at 01:03

I faced the same issue with a project of mine. After many days on debugging and searching found a solution which i am sharing with you.

function share_me(url, title) {
u=url;
t=title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),
'sharer',
'toolbar=0,status=0,width=500,height=450');

}

<a href="javascript:void(0);" onclick="share_me(url, title)" target="_blank">
Share on Facebook
</a>

Hope this will help.

Govind Ramchander31 Mar at 01:03

This solution is also not working. I am not getting what i am doing wrong.

Posted:

15 Mar at 12:03

Viewed:

3900 times

Active:

06 Apr at 10:04