Reputation: 95
I'm trying to add an image to page share via https://developers.facebook.com/docs/plugins/share-button/ However, I can't seem to find how can I add an image to the facebook share post
Upvotes: 7
Views: 19552
Reputation: 12808
The Nov 18, 2013 answer is deprecated. The current answer according to https://developers.facebook.com/docs/sharing/webmasters/
<meta property="og:image" content="http://static01.nyt.com/bookJumbo-v2.jpg" />
Upvotes: 4
Reputation: 6863
As rightly commented by demrks, Facebook uses open graph meta tags.
For your specific problem, you can use the og:image
meta tag,
<meta name='og:image' content='path'>
Replace path with the path to where your image is.
You can check how your url appears on the timeline by using the Facebook url debugger.
Upvotes: 15