Best way to get mentions with a particular hashtag?


#1

Hey everybody. I’ve been wrestling with this for a while now, hope someone can point me in the right direction.

I’ve built a data visualization that’s supposed to show tweets over the past month and will continue until next year, with a mention of @aigamn and a hash tag of #AIGA100. These should be a list of people’s favorite memories of our organization. What I’m looking for are the tweets listed here: http://www.google.com/cse?cx=004053080137224009376%3Aicdh3tsqkzy&ie=UTF-8&q=%40aigamn+%23aiga100&siteurl=www.google.com%2Fcse%2Fhome%3Fcx%3D004053080137224009376%3Aicdh3tsqkzy&ref=www.google.com%2F&ss=7000j4664168j20&oq=%40aigamn+%23aiga100&gs_l=partner.3...2077.9092.0.9629.18.17.1.0.0.0.130.1240.12j5.17.0.gsnos%2Cn%3D13...0.6999j4664411j20..1ac.1.25.partner..16.2.120.7L6FIKWsdUA#gsc.tab=0&gsc.q=%40aigamn%20%23aiga100&gsc.page=1

We already started getting tweets, so I think the streaming API is out. Also, we need to get them from a month back, and up to 11 months into the future, so I believe that also disqualifies the search API. My initial thoughts are using rest with statuses/mentions_timeline (https://dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline), and then filtering out the ones that don’t have the hash tag I’m looking for. On the page though, it says it can return 800 tweets in the main description, which would be adequate, but under count, it says it can only return a maximum of 200, which would not be nearly enough.

So I’m looking for advice from some of you veterans out there: is mentions_timeline the best solution to my problem? I’m using a PHP in a cron script to update this once an hour, the oAuth library being tmhoauth, if that has any bearing on the response. I appreciate any input. Thanks.


#2

One more note, it should also exclude tweets from @aigamn, only mentions directed at us.