Search code examples
twitterhyperlinkwidgetembedfeed

Twitter Widget only shows link


I admit I've never done this before, but I have to add a Twitter Feed Widget on a website. It seemed like the easiest thing to do with the Twitter Widget creator, which gave me this code saying "just copy and paste into your code":

<a class="twitter-timeline" href="https://twitter.com/IervolinoAI" data-widget-id="258954607332573184">Tweets di @IervolinoAI</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

I did, but it only shows the link to the profile. I tried it also on http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic but it's the same in there: only shows the link.

Is there something I am completely missing? Thanks in advance for the help.


Solution

  • I figured it out, I feel kind dumb but in my defense the instructions on Twitter are a little bit misleading:

    On the "domains" field I had copy/pasted my domain, complete with "http://" but it gave me error. So I looked more carefully on the example in the field and it showed only "example.com" so i went for it, just title and .com. It accepted it, but still my widget didn't work.

    Only when I tried to add my domain starting with a "www." it worked.

    Simple, yet Twitter could have been clearer.