TwidereProject / Twidere-Android

http://twidere.com
2.75k stars 377 forks source link

Unable to like tweets #1293

Closed RMCampos closed 4 years ago

RMCampos commented 4 years ago

Unable to like tweets

Expected behavior

Tweet to be liked.

Actual behavior

An alert: Network error: Empty data

Steps to reproduce

Nothing tricky. Occurs a lot, just trying to like a tweet. Sometimes it works, but I couldn't figure it out exactly when.

Extra info

Android version: 10 Device: Motorola One Vision My Twitter account have two factor authentication enabled.

Network type:

App version: 4.1.1

Build variant:

Micro-blogging service:

App settings:

Tedko commented 4 years ago

I can reproduce this issue on App version: 4.1.1 on my pixel. Thx for reporting.

Tedko commented 4 years ago

also on my old motox. seems this is a new issue since 4.1.1?

Tedko commented 4 years ago

Sometimes it works -- just figured out if I login with a 2nd account the like work in most of the times. umm

tjgordon commented 4 years ago

I have the same behavior in 4.1.0.

nevillepark commented 4 years ago

Same here, in 4.1.1.

koroki commented 4 years ago

I have the same problem, but it is weird:

The error only occurs some hours during the day. Around 10h in Paris hour to 16h, I cannot fav any tweet, but I can retweet.

Tlaster commented 4 years ago

According to Twitter's doc, the POST per-app limit for favorites/create is only 1000/24 hours, means that Twidere can only make 1000 likes for all users within every 24 hours. Still investigating a better workaround with it.

ze0ss commented 4 years ago

so, how do I replace the keys?

Tlaster commented 4 years ago

so, how do I replace the keys?

You can find the edit API setting at sign in page's top right, replace consumer key and consumer secret with a custom one.

ze0ss commented 4 years ago

so, how do I replace the keys?

You can find the edit API setting at sign in page's top right, replace consumer key and consumer secret with a custom one.

and where do I find the custom keys?

ze0ss commented 4 years ago

so, how do I replace the keys?

You can find the edit API setting at sign in page's top right, replace consumer key and consumer secret with a custom one.

can't find this anywhere, and would you fix it forever in next update?

Tedko commented 4 years ago

We will try to do some work around this soon with web view etc. Can’t really do through an official twitter api key since it’s a paid service of Twitter now. The Twitter api is quiet limited. For now the best solution is to use a customer key.

On Sat, May 16, 2020 at 17:13 abh-oss01 notifications@github.com wrote:

so, how do I replace the keys?

You can find the edit API setting at sign in page's top right, replace consumer key and consumer secret with a custom one.

can't find this anywhere, and would you fix it forever in next update?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TwidereProject/Twidere-Android/issues/1293#issuecomment-629614659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTAVTKKP7KA56ABFQEDBX3RRZKKBANCNFSM4MXEXJ3A .

ze0ss commented 4 years ago

We will try to do some work around this soon with web view etc. Can’t really do through an official twitter api key since it’s a paid service of Twitter now. The Twitter api is quiet limited. For now the best solution is to use a customer key.

ok, but how to..?

WalterS commented 4 years ago

We will try to do some work around this soon with web view etc. Can’t really do through an official twitter api key since it’s a paid service of Twitter now. The Twitter api is quiet limited. For now the best solution is to use a customer key.

I replaced the key with my own consumer key but the problem persists, even after force closing the app. Do I have to reinstall the app for this?

Tlaster commented 4 years ago

We will try to do some work around this soon with web view etc. Can’t really do through an official twitter api key since it’s a paid service of Twitter now. The Twitter api is quiet limited. For now the best solution is to use a customer key.

I replaced the key with my own consumer key but the problem persists, even after force closing the app. Do I have to reinstall the app for this?

Did you try sign in with your own consumer key?

WalterS commented 4 years ago

[...] Did you try sign in with your own consumer key?

Ah, that did the trick. I didn't see a logoff option, so I removed my account and added it again. Thanks!

Tedko commented 4 years ago

👍

On Mon, May 18, 2020 at 01:54 Walter S. notifications@github.com wrote:

[...] Did you try sign in with your own consumer key?

Ah, that did the trick. I didn't see a logoff option, so I removed my account and added it again. Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TwidereProject/Twidere-Android/issues/1293#issuecomment-629836091, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTAVTLJ7RY7XJLPX42BSMLRSAQFJANCNFSM4MXEXJ3A .

solpeth commented 4 years ago

I don't know if this is coincidental or not, but I'm no longer experiencing the above issue. I did the following:

  1. Settings -> Network -> Advanced -> Default API settings: set to OAuth 2
  2. Remove account
  3. Re-add account.

In the days since doing this, I haven't run into this issue of being unable to like tweets. Again, I have no idea why, so this could be pure coincidence. But maybe someone more familiar with this technology could find this useful, or rule it out as having any possible effect.

Tlaster commented 4 years ago

I don't know if this is coincidental or not, but I'm no longer experiencing the above issue. I did the following:

  1. Settings -> Network -> Advanced -> Default API settings: set to OAuth 2
  2. Remove account
  3. Re-add account.

In the days since doing this, I haven't run into this issue of being unable to like tweets. Again, I have no idea why, so this could be pure coincidence. But maybe someone more familiar with this technology could find this useful, or rule it out as having any possible effect.

Seems like what I guessing is right, previous API key for Twidere might be banned by twitter, I've updated the API key by https://github.com/TwidereProject/TwidereProject.github.io/commit/c34f50ca09bb72366df0a918b365da589875ff35 and the new key is now working perfectly.

ze0ss commented 4 years ago

I don't know if this is coincidental or not, but I'm no longer experiencing the above issue. I did the following:

  1. Settings -> Network -> Advanced -> Default API settings: set to OAuth 2
  2. Remove account
  3. Re-add account.

In the days since doing this, I haven't run into this issue of being unable to like tweets. Again, I have no idea why, so this could be pure coincidence. But maybe someone more familiar with this technology could find this useful, or rule it out as having any possible effect.

This doens't work (at least for me), in fact this doesn't display any tweets for me at all, even refreshing many times does nothing.

rju commented 4 years ago

Same here. Does not work.

Tlaster commented 4 years ago

Same here. Does not work.

The new key seems not working again.

sokai commented 4 years ago

I also have to add myself to this issue (with v4.1.3) …

I created a new customer key, signed in with that (+ OAuth2) + getting that message. I also mentioned that all likes (that didn't work) become saved in/as "Drafts" (as "Others").

Thanks for fixing in advance!

hkramski commented 4 years ago

I created a new customer key, signed in with that (+ OAuth2) + getting that message. I also mentioned that all likes (that didn't work) become saved in/as "Drafts" (as "Others")

What does "creating a customer key" mean exactly? Register as a Twitter API Dev and creating a dummy App?

Tedko commented 4 years ago

I created a new customer key, signed in with that (+ OAuth2) + getting that message. I also mentioned that all likes (that didn't work) become saved in/as "Drafts" (as "Others")

What does "creating a customer key" mean exactly? Register as a Twitter API Dev and creating a dummy App?

Register as a Twitter API Dev 

yes. might not need a dummy App

Tedko commented 4 years ago

This problem is fixed w/ updated keys etc. Feel free to reopen if the same problem occurred again

Tedko commented 4 years ago

@RMCampos let me know if this is fixed on your side:)

Remove account
Re-add account.