如何调用Twitter API来获取用户发送的所有推文,并且仅使用图片?

时间:2016-06-16 10:22:12

标签: api twitter

select (case when id is null or id=0
then (dothis) else (dothis) end) as idState 
from [SomeTable].[dbo].[BlockedSubscriberNumbers]

我使用时间轴

api.twitter.com/1.1/search/tweets.json?q=from%3AUsername&&include_entities=true&filter=images

我希望按用户名和所有图片api.twitter.com/1.1/statuses/user_timeline.json?include_rts=true&screen_name=username&page=2

过滤所有推文

但这是不可能的..

1 个答案:

答案 0 :(得分:0)

过滤器:图像应该是q参数的一部分,而不是单独的。请参阅此处的文档。

https://dev.twitter.com/rest/public/search

$ twitterapi '/1.1/search/tweets.json?include_entities=true&q=from%3Ajack filter%3Aimages' | jq -r '.statuses[] | [.entities.media[0].media_url, .text] | @tsv'
http://pbs.twimg.com/media/ClGwsUUWgAAnMfQ.jpg  RT @AmbassadorPower: Jo Cox "wld have wanted...that we all unite to fight agnst hatred that killed her." Stirring words from her husband ht…
http://pbs.twimg.com/media/ClGBdz3WkAAAPPm.jpg  RT @Square: Just launched: 3 new features for Square Invoices. t.co/Vs4NiGjOBA t.co/3BOoBFitAE
    RT @twitter: 12 hours in, see how people are Tweeting about @ChrisMurphyCT's gun violence #filibuster.\n\nt.co/hiGR6mbDyd https://t.c…
http://pbs.twimg.com/media/Ck7eDaPUgAE0jm3.jpg  RT @ElaineF: anyway, i love this data NOT because i'm a stalker but because you can tell when Hamilton's on based on his tweets! https://t.…
http://pbs.twimg.com/media/Ck8LIBtUgAAIitI.jpg  RT @nickstatt: This is pretty incredible writing: The End Of Apple Man t.co/ZyU8LC3WJt t.co/XsEYUf4juH
http://pbs.twimg.com/media/Ck9E1chVAAEx97h.jpg  RT @CamiLou1001: @Square code campers @KaylaKasprak @Victoria_Chv representing at IOS Engineering event. #CodeCamp  #WWDC2016  @jack https:…
相关问题