0

Is it possible to write a script for twitter that checks when the last time a certain user has tweeted?

Preferably using python.

Nic
  • 33
  • 7
  • 1
    It's probably irrelavant, which programming language you use. Please check the Twitter API for basic possibilities and clarify your question. – BurninLeo Apr 29 '16 at 09:44

2 Answers2

0

There is a python library for accessing the Twitter API called Tweepy

More info on the API can be found here: https://dev.twitter.com

An older post but may be relevant: streaming api with tweepy only returns second last tweet and NOT the immediately last tweet

Community
  • 1
  • 1
mmryspace
  • 689
  • 1
  • 9
  • 18
0

Yes, it is possible. Here is how using TwitterAPI.

from TwitterAPI import TwitterAPI

SCREEN_NAME = 'justinbieber'
CONSUMER_KEY = 'XXXX'
CONSUMER_SECRET = 'XXXX'
ACCESS_TOKEN_KEY = 'XXXX'
ACCESS_TOKEN_SECRET = 'XXXX'

api = TwitterAPI(CONSUMER_KEY,
                 CONSUMER_SECRET,
                 ACCESS_TOKEN_KEY,
                 ACCESS_TOKEN_SECRET)
r = api.request('statuses/user_timeline', {'screen_name':SCREEN_NAME, 'count':1})

for item in r:
        print(item['created_at'])
Jonas
  • 3,969
  • 2
  • 25
  • 30