How We Use Meta oEmbed Read
We embed public social media content across several sections of ApnaJhelum.com to enrich the experience for our local community.
Business Directory
Local businesses share promotions and updates on Facebook & Instagram. We embed their latest public posts in directory listings so visitors see live content.
Wedding & Events Hub
Wedding venues and event halls showcase their setups via Instagram. We embed these in our upcoming Wedding Hub section for planning couples.
News & Blog
When covering local news and events, we embed the original Facebook/Instagram posts as primary sources alongside our articles.
Heritage & Culture
We embed posts from historical and cultural accounts that showcase Jhelum’s heritage sites, traditions, and community events.
Live Embedded Content
These embeds are loaded in real-time via the Meta Graph API oEmbed endpoints. Each embed below shows the API endpoint used and response status.
How It Works — Technical Flow
URL Provided
A public Facebook or Instagram post URL is associated with a directory listing or article on ApnaJhelum.com.
Server-Side API Call
Our PHP backend calls the Meta Graph API oEmbed endpoint with our App Access Token (App ID + App Secret).
HTML Response
Meta returns embeddable HTML in the oEmbed response. We cache this server-side for 1 hour to reduce API calls.
SDK Rendering
The embed HTML is injected into the page, and the Facebook/Instagram JavaScript SDKs render the interactive embed.
| Component | Detail |
|---|---|
| Meta App ID | 1285416666828557 |
| Permission | meta_oembed_read |
| API Endpoints | /v21.0/oembed_post, /v21.0/instagram_oembed |
| Auth Method | App Access Token (server-side only) |
| Backend | PHP 8.2 + cURL on Hostinger shared hosting |
| Caching | File-based, 1-hour TTL, server-side |
| Content Embedded | Public Facebook posts, Instagram photos & reels from Jhelum community |