Passing title, url and image on share.php of facebook Passing title, url and image on share.php of facebook wordpress wordpress

Passing title, url and image on share.php of facebook


According to the facebook developers (bug):

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.

  1. Either you use the Share Button - requires Javascript SDK

  2. Or, use the latest Share Dialog - requires just an app id. It has a direct url direction method for invoking the share dialog:

    https://www.facebook.com/dialog/share?  app_id={app-id}  &display=popup  &href={link-to-share}  &redirect_uri={redirect-uri}


<head><meta property="og:title" content="Title" /><meta property="og:image" content="image_link" /><meta property="og:url" content="https://www.google.com/" /><meta property="og:description" content="Description" /><meta property="og:site_name" content="Google" /></head><body><a href="https://www.facebook.com/sharer.php?u=link">Facebook</a></body>

Use meta property to use title description and image and link sharer.php to share