【发布时间】:2015-03-16 10:34:57
【问题描述】:
我正在尝试使用以下脚本来获取 wordpress 网站上的推文:
'http://codepen.io/jasonmayes/pen/Ioype'
它在 codepen 上工作,但不在 wordpress 网站上。 我想用 Masonry 布局在单独的 div 中显示每条推文。
请为此提出任何解决方案。
【问题讨论】:
标签: javascript jquery wordpress twitter
我正在尝试使用以下脚本来获取 wordpress 网站上的推文:
'http://codepen.io/jasonmayes/pen/Ioype'
它在 codepen 上工作,但不在 wordpress 网站上。 我想用 Masonry 布局在单独的 div 中显示每条推文。
请为此提出任何解决方案。
【问题讨论】:
标签: javascript jquery wordpress twitter
您是否使用了正确的 ID?
代码中有一条注释说明了如何生成必须使用的 ID。
/**
* ### HOW TO CREATE A VALID ID TO USE: ###
* Go to www.twitter.com and sign in as normal, go to your settings page.
* Go to "Widgets" on the left hand side.
* Create a new widget for what you need eg "user time line" or "search" etc.
* Feel free to check "exclude replies" if you don't want replies in results.
* Now go back to settings page, and then go back to widgets page and
* you should see the widget you just created. Click edit.
* Look at the URL in your web browser, you will see a long number like this:
* 345735908357048478
* Use this as your ID below instead!
*/
【讨论】: