All Apps and Add-ons

Twitter2 stream configuration

nickstone
Path Finder

Given the Twitter2 app uses an example data source of the Twitter sample API, how would I go about making this useful by configuring it more specifically to follow certain hashtags or download certain timelines?

reviewing the stream-twitter.py script I have found the following line that looks familiar, but it still only gets me to narrow my search for key words etc.

Original Line 172: streamer.statuses.sample()

streamer.statuses.filter(track="FIFA", language="en")

Any ideas?

I have also tried, but it doesnt seem to work.
streamer.search.tweets(q='#FIFA', count=1000)

0 Karma
1 Solution

nickstone
Path Finder

Yea I found the answer the other day, there is a function already built into the twitter2 app that can be found in the "streamer" function

ie: streamer.user(track="FiFA")

The issue wasnt with the twitter interface, my issue was that I couldn't find any documentation on what was already built into the app and that my coding is so novice that I couldn't reverse engineer it properly.

Thanks for the reply 🙂

View solution in original post

0 Karma

nickstone
Path Finder

Yea I found the answer the other day, there is a function already built into the twitter2 app that can be found in the "streamer" function

ie: streamer.user(track="FiFA")

The issue wasnt with the twitter interface, my issue was that I couldn't find any documentation on what was already built into the app and that my coding is so novice that I couldn't reverse engineer it properly.

Thanks for the reply 🙂

0 Karma

Raghav2384
Motivator

Have you used stream.filter function?

I wrote my own py script using tweepy and it's much simpler as i can control the data outside of Splunk and feed the data i want to SPlunk.

from tweepy.streaming import StreamListener.

stream.filter(track=['This That','Movies','Audio'.....])

Hope this helps!
Thanks,
Raghav

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...