Search code examples
javascripthtmltwitter

Trying to embed Twitter feed to html website but only link is showing up


I know there are similar questions but I didn't find any appropiate answer; I am trying to embed my twitter profile into a website using <a class="twitter-timeline" data-lang="en" data-theme="dark" href="https://twitter.com/CiberCinema?ref_src=twsrc%5Etfw">Tweets by CiberCinema</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> as generated by https://publish.twitter.com/.

but this is how it looks like: enter image description here

this is the code I am using

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CiberCinema</title>
    <link href='http://fonts.googleapis.com/css?family=Oswald:400,700' rel='stylesheet' type='text/css'>
<!--                 <link rel="stylesheet" href="styles.css">
 -->        <link rel="stylesheet" href="fonts.css">
        <link rel="icon" type="image/png" href="claquetapng.png" />
</head>
<body>
                <div id="particles-js"></div>

        <header>
        <div class="texto">
                <h2 class="texto">CiberCinema</h2></div>
        </div>
</header>

<div class="twitter">   
<a class="twitter-timeline" data-lang="en" data-theme="dark" href="https://twitter.com/CiberCinema?ref_src=twsrc%5Etfw">Tweets by CiberCinema</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>

</body>

how can I make my feed look as desired? (like this)

enter image description here


Solution

  • For me, and as HugoHiasl pointed out, your code works fine.

    Therefore there are a few things you might wanna check for solving this problem:

    1_ Refresh/Close your browser

    2_ Try a different browser

    3_ Restart your laptop

    4_ See if there is anything external like css code or something, hidding the twitter timeline.