syntaxError: ‘continue’ not properly in loop

continue is only allowed within a for or while loop. You can easily restructure your function to loop until a valid request. def writeHandlesToFile(): while True: with open(“dataFile.txt”,”w”) as f: try: lst = tweepy.Cursor(tweepy.api.followers,screen_name=”someHandle”,).items(100000) print “cursor executed” for item in lst: f.write(item.screen_name+”\n”) break except tweepy.error.TweepError as e: print “In the except method” print e time.sleep(3600)

Twitter Call back URL

I had the same problem and the TwitterKit documentation is not accurate or Twitter has changed their policies. In any case, on the Twitter Apps site, the callback URL has to be set very specifically. The callback URL should be in the format: twitterkit-{consumer/api key}:// For example: twitterkit-128238aKjqlp123AKdasdf:// Also, this needs to be registered in … Read more

Android action bar like twitter sample

Yet another action bar implementation can be found here (shameless plug), https://github.com/johannilsson/android-actionbar. It’s implemented as a library project so there’s no need to copy-paste resources. Implementation wise it’s built as a widget that extends a RelativeLayout with it own layout for the actions and the bar. This makes it possible to add it to layouts … Read more

Character countdown like on twitter

Make a span and textarea and give them unique selectors (using an ID or class) like so: <textarea class=”message” rows=”2″ cols=”30″></textarea> <span class=”countdown”></span> And then make an update function like so: function updateCountdown() { // 140 is the max message length var remaining = 140 – jQuery(‘.message’).val().length; jQuery(‘.countdown’).text(remaining + ‘ characters remaining.’); } And make … Read more