Newbie - Can't get html widget to work

I’m really new to Hype so this question might seem silly. I have pasted some html code into a widget so that my Twitter feed can be seen on my page. The code is:

<a class="twitter-timeline" href="">Tweets by Waste_Deep</a> <script async src="//" charset="utf-8"></script>

When I preview the page within Hype, the widget works fine, however, when I export the file, the widgets are blank. I can’t figure out why. Any help would be much appreciated!

WasteDeep Social Media Test (1.7 MB)

Since this starts with //platform, when you preview it on your computer it uses the file:// protocol, so it doesn’t work. To force it to actually access the platform domain, you’ll need to use

So your full code would be:

<a class="twitter-timeline" href="">Tweets by Waste_Deep</a> <script async src="" charset="utf-8"></script>

1 Like

Thanks heaps Daniel!! It’s working now.

One more question if you can. Will some widgets only work if the site has been hosted? I have a Facebook widget which, as with the Twitter widget, previews correctly within Hype, however, fails when I export it. The code I’m using is:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); = id;
  js.src = "//";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-comments" data-href="" data-numposts="5"></div>

Thanks a lot!

Looks like you might be hitting the same problem. Notice how the URL is //connect ?

Just change // to

When posting code, select your code and click this button in the forum compose window:

Thanks again. I did try adding the https: however it still doesn’t work unless the site is hosted; which is fine for what I’m doing. Apologies for not using < / > button!

Do you use a local server, like Mamp pro, when you test your files locally?