Search code examples
facebookurlpostpluginssharing

Facebook Sharing plugin doesn’t detect the specified post URL


I use Facebook share button to share my article (Title, description and image) on Facebook using Open Graph Meta and other default Meta And my articles are echoed in post.php page like (mywebsite.com/post.php?id=post_id) which contents differ through post_id. Well, while sharing a post on fb, facing some problems.

1: fb share doesn't detect the image belonging to the article/current post that is shared. (Thought the image URL in my Open Graph Meta is correct) and after sharing it on Facebook the link doesn’t redirect to the exact URL (mywebsite.com/post.php?id=post_id).

2: the fb share button is in my post.php page which shares different posts but sharing is counted same for all posts. The FB share button has got an attribute (data-href="url-to-share") which my one is (data-href="<?php echo'post.php?id=post_id';?>"). Anyone know what and where is wrong with my code/URL addressing?


Solution

  • If your meta tags shows correct data then must be fb issue. I faced similar problem before. Try debug your url in the FB debugger( https://developers.facebook.com/tools/debug/og/object/ ). It helps.

    Fb haven't grab your updated data because they have their own time/interval to grab new data from the website(if im not mistaken). Using the debugger u'll see how the share will look like and show missing details if any.