Hey all, very new to Bootstrap Studio and CSS but I'm using it for a school project right now. When previewing the site, the custom code Twitter embed works perfectly in the browser. When exported however, it won't show up when I open the HTML file.
Any idea what the problem is? All of the other assets work fine.
You should try bringing up the web browsers Development Tool window (F12) and then refresh your page and look in the Console section of the Dev Tools to see if there are any errors. If there are, knowing those error might help figure out what's wrong.
Thank you Saj, I'm sure that's the problem. I am just double clicking on the .html file. So if it were eventually hosted on a server, it would probably work?
Right now the error reports: file://platform.twitter.com/widgets.js Failed to load resource: net::ERR_FILE_NOT_FOUND
Thanks so much, I appreciate the help!
Yes if it were hosted some where you should be good to go then.
I'm going to have to go with, I doubt including a local file of widgets.js locally will work as it's going to need to communicate with the twitter server to get your real time timeline/feed content which it can't if it's not hosted.
You probably can fake it though if you want to try by viewing your site in the preview and letting the twitter feed load.
- In your site add an
id="twitter-code" on the parent element that directly contains the Twitter code you entered.
- Then use the Dev Tools (F12) the first tab should show you all your HTML find the
id="twitter-code" right click it and select Copy Element(inner if it's choice) or select Edit as HTML and highlight everything in the box and Copy it.
- In the BSS app, on the bottom right in the Design pane click on Pages to expand right click on your page that has the twitter code and select Duplicate rename it to something like index-local
- double click that duplicated page and on the bottom left in the Overview pane, find
- right click it and select Convert to HTML that will change to say Custom Code
- select it and then on the top right in the Options pane, click on the icon that looks like
< > to expose the Custom Code component in the bottom middle
- select all the content and paste in the code you copied from the Dev Tools
That I think should probably work and you'll have a spot in time in your twitter feed that can be viewed locally but it still won't function like normal though.
Just let the teacher know there is a Twitter widget but it requires the site to be hosted on a web server to function so you made a local file that should display a non-functioning Twitter widget so they can see what it looks like. Obviously, verify that this actually works and all images etc... load so it doesn't look bad.
Wonderful! I'll give that a try. Thanks again for the help!