How to Implement Bitsy OpenGraph
Step 1: Set Up Your Parameters
When configuring OpenGraph, you need to define specific parameters for your links. The key parameters include:-
has_opengraph
: Boolean indicating if OpenGraph metadata is included. -
meta_title
: Title for the link, up to 150 characters. -
meta_description
: Description for the link, up to 250 characters. -
meta_image
: URL of the image to use for the link’s metadata.
Step 2: Define Your OpenGraph Metadata
Here’s a straightforward structure for your OpenGraph metadata configuration:-
Set
has_opengraph
to true to indicate metadata is included. -
Provide the
meta_title
,meta_description
, andmeta_image
for optimal presentation.
Example OpenGraph Configuration
Here’s a sample of how you might structure your OpenGraph configuration:Explanation of the Example
has_opengraph
: Indicates that OpenGraph metadata is active.meta_title
: The title displayed when the link is shared.meta_description
: A brief description that provides context for the link.meta_image
: The image that represents the content visually.
Step 3: Testing Your Setup
Before deploying, it’s essential to test how your links appear on social media:- Use tools like Facebook’s Sharing Debugger to preview how your OpenGraph metadata is rendered.
- Ensure all fields are correctly populated and that the image displays as intended.