Twitter upload problem
Posted: Sun 04 Nov 2018 9:34 pm
I have recently noticed that my software is only updating every 2-3 hrs instead of every 30 minutes which is set in my settings. Is anyone else having this problem?
Marc
Marc
Support forum for Cumulus weather station software
https://cumulus.hosiene.co.uk/
I have done this solely to keep our Cumulus tweeting functionality available and usable.steve wrote: ↑Mon 05 Nov 2018 10:23 am Twitter keep introducing new ways of making things difficult for third party software developers, including this latest restriction on the number of updates. It is possible to beg them to raise the limit on a per-application basis, so someone might want to take over being the Cumulus developer as far as Twitter is concerned, and jump through the hoops.
I noticed it happened to Meteobride too. the developer managed to get the app approved by Twitter so allowing users to continue tweeting.
Code: Select all
#!/usr/bin/env python
from twython import Twython
# Define constants
CONSUMER_KEY = 'xxxxxxxxxxxxxxxxxx'
CONSUMER_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
ACCESS_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
ACCESS_SECRET ='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx''
# Create a copy of the Twython object with all our keys and secrets to allow easy commands.
api = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)
text = open('/home/pi/CumulusMX/web/tweet.txt','rb') # Cumulus has been set to create tweet.txt by processing tweetT.txt
api.update_status(status=text)
# api.update_status is now deprecated, but works, and is simpler than the below [untested]
#twitter.update_status(status=text)
Code: Select all
55 0 * * * sleep 5 && /usr/bin/python3 /usr/local/bin/twitter.py /dev/null 2>&1