Search code examples
facebookfacebook-graph-apifacebook-opengraphfacebook-sharer

Overwrite og meta details by values in parameters for social sharing


I am using following kind of URL for facebook sharing:

https://www.facebook.com/sharer/sharer.php?u=http://sharethingz.com&t=%22my%20title%22&summary=%22Here%20is%20my%20summary%22

Facebook is scrapping data from my page i.e. og meta. I want to add all the data by myself using parameters in URL.

Please let me know how to achieve this.

Thanks


Solution

  • You cannot set the parameters with sharer.php, you should instead use Feed Dialog. Its quite simple to integrate it.

    You can use the URL Redirection:

    https://www.facebook.com/dialog/feed?
      app_id={app-id}
      &display=popup
      &caption={caption}
      &link={link}
      &title={title}
      &picture={picture}
      &description={description}
      &redirect_uri={redirect-url}
    

    You can find the list of parameters here.