使用Twython“收藏”推文

时间:2013-12-05 08:10:34

标签: api twitter twython favorite

我正在尝试'喜欢'使用Twython的推文,因为我知道推文的ID,如“POST收藏夹/创建”部分下的“https://dev.twitter.com/docs/api/1.1”中所述。

有关如何使用Twython搜索,更新状态等的大量文档,但是我无法找到有关如何使用Twython使用其余Twitter API的文档(除了搜索,get_home_timeline)和update_status方法)。

如果有人能帮助我找到使用Twython的所有Twitter API方法的文档,我会非常感激,更具体地说,如何“喜欢”

谢谢

1 个答案:

答案 0 :(得分:2)

是的,有一个最喜欢的功能。一旦您使用它的信息检索推文,您应该能够使用Twython.create_favorite转发它:

twitter = Twython(APP_KEY, APP_SECRET
                  OAUTH_TOKEN, OAUTH_TOKEN_SECRET)

#obtain the id of tweet you want to favorite
...
tweet_id = xxx
#done obtaining it

twitter.create_favorite(id=tweet_id)

来源:Twython 3.1.1 Documentation

相关问题