moko256 / twitlatte

Twitter and Mastodon client for Android
Apache License 2.0
102 stars 13 forks source link

Twitter refuses write requests due API limits #37

Closed Mic92 closed 5 years ago

Mic92 commented 5 years ago

From adb logcat:

10-21 11:08:42.435 17589 17589 W System.err: 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when re
quests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
10-21 11:08:42.435 17589 17589 W System.err: message - Application cannot perform write actions. Contact Twitter Platform Operations through https://support.twitter.com/forms
/platform
10-21 11:08:42.435 17589 17589 W System.err: code - 261
10-21 11:08:42.435 17589 17589 W System.err:
10-21 11:08:42.435 17589 17589 W System.err: Relevant discussions can be found on the Internet at:
10-21 11:08:42.435 17589 17589 W System.err:    http://www.google.co.jp/search?q=b9fdc443 or
10-21 11:08:42.435 17589 17589 W System.err:    http://www.google.co.jp/search?q=1100eeb7
10-21 11:08:42.435 17589 17589 W System.err: TwitterException{exceptionCode=[b9fdc443-1100eeb7], statusCode=403, message=Application cannot perform write actions. Contact Twi
tter Platform Operations through https://support.twitter.com/forms/platform, code=261, retryAfter=-1, rateLimitStatus=null, version=4.0.7}
10-21 11:08:42.435 17589 17589 W System.err:    at twitter4j.AlternativeHttpClientImpl.handleRequest(AlternativeHttpClientImpl.java:127)
10-21 11:08:42.435 17589 17589 W System.err:    at twitter4j.HttpClientBase.request(HttpClientBase.java:57)
10-21 11:08:42.435 17589 17589 W System.err:    at twitter4j.HttpClientBase.post(HttpClientBase.java:86)
10-21 11:08:42.435 17589 17589 W System.err:    at twitter4j.TwitterImpl.post(TwitterImpl.java:2102)
10-21 11:08:42.435 17589 17589 W System.err:    at twitter4j.TwitterImpl.retweetStatus(TwitterImpl.java:241)
10-21 11:08:42.435 17589 17589 W System.err:    at com.github.moko256.twitlatte.dt.b(StatusView.java:497)
10-21 11:08:42.435 17589 17589 W System.err:    at com.github.moko256.twitlatte.eo.a(Unknown Source:2)
10-21 11:08:42.435 17589 17589 W System.err:    at b.a.e.e.c.a.b(SingleCreate.java:39)
10-21 11:08:42.435 17589 17589 W System.err:    at b.a.n.a(Single.java:3394)
10-21 11:08:42.435 17589 17589 W System.err:    at b.a.e.e.c.g$a.run(SingleSubscribeOn.java:89)
10-21 11:08:42.436 17589 17589 W System.err:    at b.a.m$a.run(Scheduler.java:579)
10-21 11:08:42.436 17589 17589 W System.err:    at b.a.e.g.i.run(ScheduledRunnable.java:66)
10-21 11:08:42.436 17589 17589 W System.err:    at b.a.e.g.i.call(ScheduledRunnable.java:57)
10-21 11:08:42.436 17589 17589 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
10-21 11:08:42.437 17589 17589 W System.err:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
10-21 11:08:42.437 17589 17589 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
10-21 11:08:42.437 17589 17589 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
10-21 11:08:42.437 17589 17589 W System.err:    at java.lang.Thread.run(Thread.java:764)

This happens in the f-droid variant. How is this handled in the play store version? Would it help if enter my own API keys? If so, it would be great if I could do this in the application to not have to compile twitlatte myself.

moko256 commented 5 years ago

Hello. It happens in Google Play store variant too. I've requested Twitter to send me more details why twitlatte have been restricted. But Twitter hasn't reply to me... Today, I implemented queue not to send too much like/rt request to server in a few time. I will request to unlock API key. Anyway, I will implement how to change consumer key/token to yours if API key is completely locked.

moko256 commented 5 years ago

E-mail from Twitter:

Hello,

Thanks for reaching out. Your app has been restricted or suspended due to one or more violations of our Developer Agreement and Policy, Automation Rules, Display Requirements and/or Twitter Rules. Common reasons for this happening include:

Users reporting content posted through your app as spam (Tweets, RTs, favs, DMs, etc.)

Abusive use of automations, like auto-following/unfollowing  

Suspicious API usage, such as repeatedly hitting rate limits

Display violations regarding how you must show Tweets

This list is not exhaustive, so review our policy documentation to ensure that your app and your app’s users are following all of our rules.

Please respond to this email if you need further clarification, but note that we will only consider a request to lift this restriction after you provide us with the following information:

App ID and consumer key

Link to and instructions on how to log into your app to review it for compliance

A list of specific changes that you have made to resolve policy non-compliance

We will not respond to requests to lift restrictions that do not include this information.

Regards,

Twitter Platform Operations
IzzySoft commented 5 years ago

Any progress on this? I'm just about to ditch Twitter for good. Especially the rule to block all users of an app if someone used that app for spam and got reported is discriminating, as they certainly won't apply it to their own app.

Mic92 commented 5 years ago

Reading might be sufficient for me as well for the most part. For the rest I can use Mastodon.

IzzySoft commented 5 years ago

As said, this makes me strongly consider ditching Twitter. And leaving a little tweet-series telling them I did this "due to one or more violations of my code of conduct" (users of the platform used it for spamming/hate speech/ads; suspicious API usage such as blocking apps for posts a user might have made with them; display violations on how they interact with app authors (like shown above)), this being a "not exhaustive" list – and I will not reconsider or even act on replies without them not including the information how the listed issues have been addressed …

I rarely write there anymore. I just noticed the problem when trying to boost … ahem, retweet.

moko256 commented 5 years ago

In version 1.6.4, twitlatte use new consumer key/secret. Please log in again in the app. Thanks!

moko256 commented 5 years ago

Now v1.6.4 is available in F-Droid and Google Play

IzzySoft commented 5 years ago

Hey, that did the trick – thanks @moko256! Now I should hurry writing my good-bye to my followers, before I'm unable again for whatever reason :rofl:

polyzen commented 4 years ago

Running into this today. Logging out and back in did not resolve.

polyzen commented 4 years ago

I can retweet, but not like.

Edit: I also cannot unfollow, and presumably other things.

polyzen commented 4 years ago

Looks like AndStatus is having this same issue for me.

polyzen commented 4 years ago

Ping @moko256