Sourabh TiwariVinayak Shantaram Joshi
Published © GPL3+

What's Trending?

Are you addicted to social media? Interested in what's trending now. So this project will let you know the most trending hashtag on Twitter.

BeginnerFull instructions provided30 minutes2,386
What's Trending?

Things used in this project

Story

Read more

Code

twitter_trend.py

Python
from twitter import *
import requests
from boltiot import Bolt
API_KEY = 'Your API Key'
DEVICE_ID = 'BOLTXXXX'
twitter = Twitter(auth = OAuth("access_key", "access_secret", "consumer_key", "consumer_secret"))
mybolt = Bolt(API_KEY, DEVICE_ID) #Create object to fetch data from Bolt
results = twitter.trends.place(_id = 'Your Place ID')
for location in results:
	for trend in location["trends"]:
		data_to_display = trend["name"] +' '+ str(trend["tweet_volume"])
		response = mybolt.serialWrite(data_to_display) # Calling serialWrite function to display data on display connected to Bolt
		break

Credits

Sourabh Tiwari

Sourabh Tiwari

2 projects • 25 followers
Software Developer
Vinayak Shantaram Joshi

Vinayak Shantaram Joshi

11 projects • 63 followers

Comments