我试图通过简单地使用Twitter的 @anywhere API 在我的网站上放置一个推文框。虽然这工作正常并且设置简单,但它存在以下问题:
- 加载超过 3 秒(https://stackoverflow.com/questions/19907/what-do-most-users-consider-acceptable-load-times-on-a-website)
- 发出 14 个请求
- 两次调用 jQuery
是否有其他替代方法可以使用@anywhere
?
编辑:这是我的代码..
<div id="twitter_widget">
<script src="http://platform.twitter.com/anywhere.js?id=**MYAPPID**&v=1"></script>
<script type="text/javascript">
twttr.anywhere(function (T) {
T("#twitter_widget").tweetBox({
label: "<span style='display:block !important;margin-bottom:5px !important;font-family:Helvetica Neue !important; color: #CCC !important; font-size: 18px !important; font-weight: 500 !important;'>Tweet</span>",
height: 100,
width: 300,
defaultContent: ""
});
});
</script>
<button class="check-twitter" onclick="window.open('http://www.twitter.com','_blank');">Go to Twitter</button>
</div>