Python: python-twitter: view-status.py
Revision as of 13:39, 28 January 2017 by Onnowpurbo (talk | contribs)
from __future__ import print_function
import twitter
CONSUMER_KEY = ' '
CONSUMER_SECRET = ' '
ACCESS_TOKEN = ' '
ACCESS_TOKEN_SECRET = ' '
# Create an Api instance.
api = twitter.Api(consumer_key=CONSUMER_KEY,
consumer_secret=CONSUMER_SECRET,
access_token_key=ACCESS_TOKEN,
access_token_secret=ACCESS_TOKEN_SECRET)
user = 90134078 # ganti dengan ID twitter yang anda inginkan
statuses = api.GetUserTimeline(user)
print([s.text for s in statuses])