【问题标题】:Ruby twitter gem. how to get people who favorite my posts红宝石推特宝石。如何获得喜欢我帖子的人
【发布时间】:2015-07-16 20:37:43
【问题描述】:

我正在尝试制作一个应用程序,该应用程序将遍历我自己的帖子并获取收藏帖子的用户列表。之后,如果我还没有关注这些用户,我希望应用程序关注每个用户。我为此使用 Ruby。

这是我现在的代码:

@client = Twitter::REST::Client.new(config)
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
user = @client.user()
tweets = @client.user_timeline(user).take(20)
num_of_tweets = tweets.length
puts "tweets found: #{tweets.length}"
tweets.each do |item|
    puts "#{ item}" #iterating through my posts here
end

有什么建议吗?

【问题讨论】:

    标签: ruby twitter gem posts favorite


    【解决方案1】:

    该信息不会通过时间线集合或the endpoint representing a single tweet 在 Twitter API 中公开。这就是为什么 twitter gem,它提供了一个围绕 Rest API 的可用接口,不能给你你想要的东西。

    Favstar 等第三方网站会显示该信息,但据我所知,他们自己的 API 不会以任何可管理的方式暴露相关用户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-10
      • 2012-12-10
      • 1970-01-01
      • 2019-08-09
      • 1970-01-01
      相关资源
      最近更新 更多