Make Your Blog Social Media Friendly. To embed social media posts in your blogs, you can easily display Instagram posts, Tweets, or YouTube videos directly within your content. Here’s how to do it for each platform:
--
1. Instagram Post Embed
Steps:
- Go to the Instagram post you want to embed.
- Click the three dots (⋯) on the top right of the post.
- Choose “Embed” and copy the provided code.
- Paste the HTML code into your blog editor (in HTML view).
- Example Code:
<script async src="//www.instagram.com/embed.js"></script>
---
2. Twitter (X) Post Embed
Steps:
- Find the tweet you want to embed.
- Click the “Share” icon and select “Embed Tweet.”
- Copy the embed code.
- Paste it into the HTML of your blog post.
Example Code:
<blockquote class="twitter-tweet">
<a href="https://twitter.com/username/status/TWEET_ID"></a>
</blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
---
- 3. YouTube Video Embed
Steps:
- Open the YouTube video.
- Click “Share” > “Embed.”
- Copy the iframe code.
- Paste it into your blog’s HTML.
Example Code:
<iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID" frameborder="0" allowfullscreen></iframe>
---
Tips:
- Ensure your blog platform supports raw HTML input.
- Most CMSs like WordPress, Blogger, or Wix have a dedicated HTML block or code editor to paste these codes.
- Embeds are responsive, but you can tweak dimensions if needed using CSS.
To add social sharing buttons (Facebook, Twitter, LinkedIn) to your blog, you can use HTML with a bit of inline JavaScript or share URLs. Here's a simple code snippet you can add to your blog post template:
<div class="social-share">
<p>Share this post:</p>
<a href="https://www.facebook.com/sharer/sharer.php?u=YOUR_URL_HERE" target="_blank">Share on Facebook</a><br>
<a href="https://twitter.com/intent/tweet?url=YOUR_URL_HERE&text=YOUR_TITLE_HERE" target="_blank">Share on Twitter</a><br>
<a href="https://www.linkedin.com/shareArticle?mini=true&url=YOUR_URL_HERE&title=YOUR_TITLE_HERE" target="_blank">Share on LinkedIn</a>
</div>
Replace YOUR_URL_HERE with the URL of your blog post, and YOUR_TITLE_HERE with the post's title.
கருத்துகள் இல்லை:
கருத்துரையிடுக