如何获得Twitter #hashtag id

时间:2015-02-09 13:55:17

标签: javascript twitter

如何获取#<name> ID,例如此号码345170787868762112。我从以下例子中得到了它:http://codepen.io/jasonmayes/pen/Ioype

也许它不是#hashtag id,但任何人都可以解释,那是什么,我怎样才能找到任何#hashtag

试图谷歌,但没有找到相关的结果。

1 个答案:

答案 0 :(得分:2)

您是否阅读过与之关联的代码中的评论?

/**
 * ### 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!
 */

这些不是主题标签的ID - 它们是您先前已配置为搜索标签的小部件ID。