【发布时间】:2016-02-02 19:44:34
【问题描述】:
要使用 Dashing 创建一个监控工具,我想在一个小部件中显示 Facebook 页面的 LIKES 数。我用必要的信息检索 JSON:
{
"data": [
{
"share_count": 242039,
"like_count": 63648,
"comment_count": 52304,
"total_count": 357991
}
]
}
查看小部件中的点赞数,如本例所示:https://github.com/Ephigenia/foobugs-dashboard#default-dashboard
如何在 Ruby 中只显示点赞数?
我发现了类似的东西,但使用的是 Nokogiri https://github.com/Ephigenia/foobugs-dashboard/blob/master/jobs/twitter_user.rb
【问题讨论】:
-
你只是想解析json并将“like_count”保留为文本?
-
是的,我只想要价值。
标签: ruby json facebook widget dashing