4

pasting wordpress url in fb status bring a featured image+some text
while when I put mine (core php site) url in fb status, it shows only text but picking no image while I have more than 10 images at that page
I googled a lot but almost all posts are wordpress related while I couldn't get how to make an image featured-image for a page on php/html (non-wordpress). is there some html tag or attribute or some other method?

alamnaryab
  • 1,480
  • 3
  • 19
  • 31

2 Answers2

2

Use OpenGraph TAGs, especially og:image for the image!

Read more at https://developers.facebook.com/docs/sharing/best-practices

Berriel
  • 12,659
  • 4
  • 43
  • 67
  • I have added `` tag, it is showing other 3 images from that page but not `alam.png` mentioned in `og:image` tag – alamnaryab Sep 13 '15 at 20:58
  • Use the [Facebook Debugger](https://developers.facebook.com/tools/debug/). Check the `Scraped URL` at the end and check if the `og:image` is already there. Facebook uses a cache system, maybe your page is not updated yet. – Berriel Sep 13 '15 at 21:02
  • `scrap_url` is there `scrape_url=http%253A%252F%252Fdomain-name.com%252F&remove_url=%2Fajax%2Fcomposerx%2Fattachment%2Fstatus%2F&attachment_class=_4j&av=100000613340718&composerurihash=2"` – alamnaryab Sep 13 '15 at 21:09
  • Did you use the debugger? Did you see if the `og:image` was there? – Berriel Sep 13 '15 at 21:14
  • facebook `url debugger` do not show `og:image` while showing `og:title`, `og:type`, `og:url` and one additional which I have not put at my page that is `og:updated_time` – alamnaryab Sep 13 '15 at 21:23
  • Could you share the link of your website here? – Berriel Sep 13 '15 at 21:27
  • `og:image could not be downloaded or is too small` its minimum size is `200x200` while mine is `413x413` – alamnaryab Sep 13 '15 at 21:27
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/89528/discussion-between-alamnaryab-and-berriel). – alamnaryab Sep 13 '15 at 21:28
0

While sharing you can upload image for the post manually.