पाठ 5 / 34

ओपन ग्राफ टैग्स

सोशल मीडिया पर आपके कंटेंट को कैसे दिखाया जाए, यह नियंत्रित करने के लिए Open Graph मेटा टैग का उपयोग करें।

Open Graph क्यों महत्वपूर्ण है

Jab aap Facebook, Twitter ya LinkedIn par link share karte hain, to woh platforms aapke page ke meta tags crawl karke decide karte hain ki kaun si image, title aur description dikhani hai. Open Graph tags ke bina woh andaza lagate hain — aur aksar galat.

Open Graph मेटा टैग

Social platforms ko batane ke liye <head> mein og: properties use karein ki aapka page kaise dikhe. og:title, og:description, og:image aur og:url hamesha daalein.

<head>
  <meta property="og:title" content="Mastering React Hooks: A Complete Guide">
  <meta property="og:description" content="Learn how to use React Hooks to build modern, efficient components.">
  <meta property="og:image" content="https://example.com/images/react-hooks-guide.jpg">
  <meta property="og:image:alt" content="React Hooks diagram">
  <meta property="og:url" content="https://example.com/blog/react-hooks">
  <meta property="og:type" content="article">
  <meta property="og:locale" content="en_US">
</head>