Dikemas kini: 2026-08-26
Cara Menghantar Pautan di Facebook Dengan Gambar Mini Besar

Today I will show you how to fetch facebook Open Graph (OG) meta tags with php script. Open Graph meta tags are used in html page of website to generate previews of content. When your page is shared on facebook it will capture the og meta tags and generate the snippet. Meta tags are added inside the head tag.

Meta Keywords & Their Representation

The core Open Graph tags Facebook reads when generating a link preview are:

  • og:title – The title of your article, excluding any branding.
  • og:site_name – The name of your website.
  • og:url – The canonical URL of the page.
  • og:description – A detailed description of the piece of content.
  • og:image – The image Facebook displays in the preview thumbnail.

As an example, the following is the Open Graph protocol:

<html prefix="og: http://ogp.me/ns#">
<head>

<meta property="og:title" content="Post title" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://postrss.com" />
<meta property="og:image" content="https://postrss.com/wp-content/uploads/2014/01/mainslide1.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
...
</head>
...
</html>

Note: og:type must be a value from Facebook’s approved list — common choices are website, article, or product. Custom text like “News Site” isn’t a valid type and will be ignored by Facebook’s parser.

Getting the “Large Image” Thumbnail Specifically

Adding an og:image tag alone doesn’t guarantee the large thumbnail layout — Facebook decides between a large image card and a small square thumbnail based on your image’s dimensions and aspect ratio. To reliably get the large format:

  • Use an image at least 1200 × 630 pixels (this is Facebook’s recommended size for the large-card layout).
  • Keep the aspect ratio close to 1.91:1 — images far outside this ratio may get cropped unpredictably.
  • Include explicit og:image:width dan og:image:height tags so Facebook’s crawler doesn’t have to download the image just to measure it.
  • Make sure the image file itself is reachable over HTTPS and isn’t blocked by robots.txt.

Testing Your Open Graph Tags

Facebook caches the OG data it reads for a URL, so if you change your tags after the page has already been shared once, the old preview can keep showing. Use the Facebook Sharing Debugger to paste in your URL, see exactly which OG tags Facebook detected, and force it to re-scrape the page for an updated preview.

How This Applies to Automated Posting

When PostRSS auto-posts a new article from your RSS feed to Facebook, it relies on your page’s own OG tags (or the image embedded in your feed item) to determine the thumbnail shown. Setting up correct og:image, og:image:width, and og:image:height tags on your website — using the guidance above — is what ensures automated posts also show the large-thumbnail format rather than a small or missing preview.

Frequently Asked Questions

Why does my Facebook post still show the old image after I changed it?

Facebook caches OG data per URL. Run the URL through the Facebook Sharing Debugger and click “Scrape Again” to force a refresh.

What’s the minimum image size Facebook will accept?

Facebook’s documented minimum is 200 × 200 pixels, but anything that small will only ever render as a small thumbnail, never the large-card layout.

Do I need og:image:width and og:image:height, or is og:image enough?

og:image alone works, but adding the width/height tags lets Facebook’s crawler skip downloading the image to measure it, which makes your preview render faster and more reliably.

Does the same og:image also control the preview on other platforms?

Most major platforms, including LinkedIn and Discord, read the same Open Graph tags Facebook uses, so a correctly sized og:image typically produces a good preview across all of them. X (Twitter) is the one common exception — it primarily reads its own twitter:card dan twitter:image tags instead, so if you want a large image preview there too, add those tags alongside your Open Graph tags rather than relying on og:image alone.

Menu
x
PostRSS - Platform Automasi Suapan RSS & Alat Auto-Posting
Ringkasan Privasi

Laman web ini menggunakan kuki supaya kami dapat memberikan anda pengalaman pengguna yang terbaik. Maklumat kuki disimpan dalam pelayar anda dan menjalankan fungsi seperti mengenali anda apabila anda kembali ke laman web kami serta membantu pasukan kami memahami bahagian laman web yang anda rasa paling menarik dan berguna.