简体   繁体   中英

Twitter Widget not working

I created a twitter widget and plugged it into a page. It works fine on my computer, but not on any others. I don't even know where to begin to debug this.

Here is the twitter-generated code:

<a class="twitter-timeline" href="https://twitter.com/NavigatorPG" data-widget-id="256786483787218945">Tweets by @NavigatorPG</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>

Here is the page with the widget http://navigatorplanninggroup.org/

Any suggestions?

I am on the same problem. Your question addresses multiple issues. To debug JS you need to toggle the JavaScript in your browser and a debugger like "firebug"-a plugin to numerous browsers. This will not help for this bugged widget due to numerous issues: the broken link from Twitter in the <script> src attribute that refers to an invalid link with no protocol. Note the absent `http:!for future refence you can visit the valid link and copy&paste it into your own .js (JavaScript file and refer to it via an absolute or relative path this does not work with this widget. Switch JavaScript on and you will see the widget as expected. Either the widget code is bugged or twitter i falsely stating that their widget doesn't need JavaScript when it does.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM