javascript 在我的网站上添加最新的推文作为纯文本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12225381/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 15:38:31  来源:igfitidea点击:

Add latest tweet as pure text on my website?

javascriptjqueryhtmlcsstwitter

提问by user1594603

I've got an HTML/CSS website and want to add my latest tweet in the footer section, a few notes:

我有一个 HTML/CSS 网站,想在页脚部分添加我最新的推文,请注意以下几点:

  • I don't like the look of the available twitter widgets on their website

  • I just want something that will show Only my latest tweet as text (just the last one, not several), then I'll go around adding a background and customize the fonts through CSS.

  • I'm still a beginner when it comes to web development, so don't have any experience with JQuery/javascripts, so if the solution is done by those I'd really appreciate it if you keep it simple and easy to understand.

  • 我不喜欢他们网站上可用的 twitter 小部件的外观

  • 我只想要一些将仅显示我最新的推文作为文本的东西(只是最后一个,而不是几个),然后我将四处添加背景并通过 CSS 自定义字体。

  • 在 Web 开发方面,我仍然是初学者,所以没有任何 JQuery/javascripts 经验,所以如果解决方案是由那些人完成的,如果您保持简单易懂,我会非常感激。

I tried following this guide exactly as mentioned in the steps but it didn't work, simply nothing was shown:

我完全按照步骤中提到的方法尝试遵循本指南,但没有奏效,只是没有显示任何内容:

http://www.webdesigndev.com/programming/how-to-display-your-last-tweet-using-javascript-and-the-twitter-api

http://www.webdesigndev.com/programming/how-to-display-your-last-tweet-using-javascript-and-the-twitter-api

Maybe it's an outdated method of doing such thing, I'm not really sure, I don't want this exact method to work, just anything to get the job done.

也许这是一种过时的做这种事情的方法,我不太确定,我不希望这种确切的方法起作用,只是为了完成工作。

Any help would be really appreciated guys.

任何帮助将非常感谢伙计们。

采纳答案by Brad

This might help you. Go into your editor and replace the "" from what the source code you copy is using and replace it with real "". On all 3 lines

这可能对你有帮助。进入您的编辑器并替换您复制的源代码使用的“”并将其替换为真正的“”。在所有 3 行

Got it to work for me

让它对我来说有效

回答by Florian Bauer

Just add this to your website on the place you need it:

只需将其添加到您网站上需要的地方即可:

<div id=”twitter_update_list”>
  <script type=”text/javascript” src=”http://twitter.com/javascripts/blogger.js”></script>
  <script type=”text/javascript” src=”http://twitter.com/statuses/user_timeline/[yourusername].json?callback=twitterCallback2&count=1″></script>
</div>