Embed Tweets to your blog or web site directly or programatically

Embed :

Go to www.twitter.com and select which tweet you want to embed click to view the tweet

popup will open

Click ellipses at the bottom “…”

Select Embed Tweet.
Copy the code snippet and paste it in your blog or website where ever you want it.

IT looks like below:

<blockquote class=”twitter-tweet” data-lang=”en”><p lang=”en” dir=”ltr”>Facebook simplifies confusing chatbots with buttons, not text commands <a href=”https://t.co/PaE83UCyD6″>https://t.co/PaE83UCyD6</a> by <a href=”https://twitter.com/JoshConstine”>@joshconstine</a> <a href=”https://t.co/2hOHlcjGzd”>pic.twitter.com/2hOHlcjGzd</a></p>&mdash; TechCrunch (@TechCrunch) <a href=”https://twitter.com/TechCrunch/status/748787660588617729″>July 1, 2016</a></blockquote>
<script async src=”//platform.twitter.com/widgets.js” charset=”utf-8″></script>

Facebook simplifies confusing chatbots with buttons, not text commands https://t.co/PaE83UCyD6 by @joshconstine pic.twitter.com/2hOHlcjGzd

β€” TechCrunch (@TechCrunch) July 1, 2016

Programatically:

Get the unique tweet ID from the popup url when you open a tweet:

looks like: 715632392610848768

<script src=”jquery.min.js”></script>
<script>
$(document).ready(function(){
  var url = “715632392610848768”; //Tweet ID
    if (url==””){
        $(“#tweet_div”).addClass(“error”);
    }
    else {
        $(“#tweet_div”).show();
        $.ajax({
            url: “https://api.twitter.com/1/statuses/oembed.json?id=”+url,
            dataType: “jsonp”,
            success: function(data){
                $(“#tweet_div”).html(data.html);
            }
        });
    }
})

</script>

<div id=”tweet_div”>

</div>

Here are the some of the book recommendations :

           

Enable GingerCannot connect to Ginger Check your internet connection
or reload the browser
Disable in this text fieldEditEdit in GingerEdit in GingerΓ—

Leave a Reply

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks