Twidere-Android icon indicating copy to clipboard operation
Twidere-Android copied to clipboard

Use a more modern Twitter Android version that works

Open Torvin opened this issue 2 years ago • 26 comments

This change allows me to use Twidere again after the 3rd-party API ban. You just need to use the official Android consumer key and it works. XAuth works too.

I know that this project is not actively maintained, but please consider releasing this minor update 🙏

Potentially fixes #1478 (I haven't encountered it so couldn't test)

Torvin avatar Feb 05 '23 02:02 Torvin

How does one do this please? Is there an .APK? The Android consumer codes I find only give errors. I am inexperienced with GitHub though

Noremon avatar Mar 14 '23 01:03 Noremon

How does one do this please? Is there an .APK?

This PR needs to be merged by the owner of this project, which I'm not sure is going to happen 😞

Torvin avatar Mar 14 '23 01:03 Torvin

Ahhh; I was worried I was missing something. Thanks!

On Monday, 13 March 2023, Torvin @.***> wrote:

How does one do this please? Is there an .APK?

This PR needs to be merged by the owner of this project, which I'm not sure is going to happen 😞

— Reply to this email directly, view it on GitHub https://github.com/TwidereProject/Twidere-Android/pull/1482#issuecomment-1467214876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2LSPV3XE5JADQCGPRITPTW37EGRANCNFSM6AAAAAAURQB5C4 . You are receiving this because you commented.Message ID: @.***>

Noremon avatar Mar 14 '23 01:03 Noremon

Where did you find the key? https://gist.github.com/pvieito/ee6d2c8934a8f84b9aeb467585277b8a。 That's Invalid.

tangxiangpi avatar Mar 31 '23 03:03 tangxiangpi

Where did you find the key? https://gist.github.com/pvieito/ee6d2c8934a8f84b9aeb467585277b8a。 That's Invalid.

It's not invalid. But it's not going to work unless this PR is merged

Torvin avatar Mar 31 '23 11:03 Torvin

Where did you find the key? https://gist.github.com/pvieito/ee6d2c8934a8f84b9aeb467585277b8a。 That's Invalid.

It's not invalid. But it's not going to work unless this PR is merged

Are you sure? I see that you have only changed one file and only the version number. Would that have worked?

tangxiangpi avatar Mar 31 '23 11:03 tangxiangpi

Where did you find the key? https://gist.github.com/pvieito/ee6d2c8934a8f84b9aeb467585277b8a。 That's Invalid.

It's not invalid. But it's not going to work unless this PR is merged

You have changed the version number of the Twitter client. I noticed that twidere determines if it is Twitter Android by the consumer key, that key is defined, so what is the SECRET key?

tangxiangpi avatar Mar 31 '23 11:03 tangxiangpi

Are you sure? I see that you have only changed one file and only the version number. Would that have worked?

You have changed the version number of the Twitter client. I noticed that twidere determines if it is Twitter Android by the consumer key, that key is defined, so what is the SECRET key?

Yes, changing the version number is enough to make it work. I'm using the key you linked ("Twitter for Android")

Torvin avatar Mar 31 '23 12:03 Torvin

Are you sure? I see that you have only changed one file and only the version number. Would that have worked?你确定吗?我看到你只更改了一个文件,而且只更改了版本号。那行得通吗?

You have changed the version number of the Twitter client. I noticed that twidere determines if it is Twitter Android by the consumer key, that key is defined, so what is the SECRET key?您更改了 Twitter 客户端的版本号。我注意到 twidere 是通过 consumer key 判断是否是 Twitter Android 的,那个 key 是有定义的,那么 SECRET key 是什么?

Yes, changing the version number is enough to make it work. I'm using the key you linked ("Twitter for Android")是的,更改版本号足以使其工作。我正在使用您链接的密钥(“Twitter for Android”)

I'll try it, so what is the mechanism? In addition to checking the key, does twitter check the request header? This version number is not the latest twitter version, only a specific version number can be normal?

tangxiangpi avatar Mar 31 '23 13:03 tangxiangpi

I'll try it, so what is the mechanism? In addition to checking the key, does twitter check the request header? This version number is not the latest twitter version, only a specific version number can be normal?

That's right, twitter banned its own old client - version 6 that is hardcoded into Twidere doesn't work anymore. It doesn't have to be version 8 to make it work, but I tested this version and it works

Torvin avatar Mar 31 '23 21:03 Torvin

I'll try it, so what is the mechanism? In addition to checking the key, does twitter check the request header? This version number is not the latest twitter version, only a specific version number can be normal?

That's right, twitter banned its own old client - version 6 that is hardcoded into Twidere doesn't work anymore. It doesn't have to be version 8 to make it work, but I tested this version and it works

but still 401 , do you know why ? 3 1 2

tangxiangpi avatar Apr 01 '23 01:04 tangxiangpi

I'll try it, so what is the mechanism? In addition to checking the key, does twitter check the request header? This version number is not the latest twitter version, only a specific version number can be normal?

That's right, twitter banned its own old client - version 6 that is hardcoded into Twidere doesn't work anymore. It doesn't have to be version 8 to make it work, but I tested this version and it works

Could it be that it was normal when you tested it, but it is now invalid

tangxiangpi avatar Apr 01 '23 01:04 tangxiangpi

I use Twidere every day and it works perfectly. You need to log in with that official key though (via XAuth), otherwise it doesn't use the official key

Torvin avatar Apr 01 '23 07:04 Torvin

I use Twidere every day and it works perfectly. You need to log in with that official key though (via XAuth), otherwise it doesn't use the official key

Awesome, it does. How did you do it, did you use the official twitter client to capture packets? I think if this version number is useless, I can try it myself

tangxiangpi avatar Apr 01 '23 13:04 tangxiangpi

How did you do it, did you use the official twitter client to capture packets

Logging in via Twidere works, unless you get login challenge. If you do - you can use this python script to retrieve the token

Torvin avatar Apr 02 '23 06:04 Torvin

How did you do it, did you use the official twitter client to capture packets你是怎么做到的,你是用官方twitter客户端抓包的

Logging in via Twidere works, unless you get login challenge. If you do - you can use this python script to retrieve the token除非您遇到登录挑战,否则通过 Twidere 登录是可行的。如果你这样做 - 你可以使用这个 python 脚本来检索令牌

The official twitter key does work. I tried to use the HootSuite key (I found it on the Internet, it should be available), but I got 401. I am sure it is the enterprise version. Is it different from the personal version, and some headers need to be added. Also, should a newer version of twitter be used, so that the deprecation time will be extended later

tangxiangpi avatar Apr 02 '23 07:04 tangxiangpi

How did you do it, did you use the official twitter client to capture packets你是怎么做到的,你是用官方twitter客户端抓包的

Logging in via Twidere works, unless you get login challenge. If you do - you can use this python script to retrieve the token除非您遇到登录挑战,否则通过 Twidere 登录是可行的。如果你这样做 - 你可以使用这个 python 脚本来检索令牌

It was okay yesterday, but it is invalid today. I don’t know how it is on your side.

tangxiangpi avatar Apr 02 '23 10:04 tangxiangpi

How did you do it, did you use the official twitter client to capture packets你是怎么做到的,你是用官方twitter客户端抓包的

Logging in via Twidere works, unless you get login challenge. If you do - you can use this python script to retrieve the token除非您遇到登录挑战,否则通过 Twidere 登录是可行的。如果你这样做 - 你可以使用这个 python 脚本来检索令牌

It was okay yesterday, but it is invalid today. I don’t know how it is on your side.昨天还好,今天就无效了。不知道你那边怎么样。

I seem to find some regularity that not all accounts are available. Today I tried to modify the version number of twitter (currently the latest), and then use my account to log in, 401, and then re-modify the version number written by you, and I can no longer log in, also 401; After reverting to the version number you wrote:

  1. Then I registered a new account and can log in;
  2. But I can't log in with an old account; 401, I don't know the reason

tangxiangpi avatar Apr 02 '23 14:04 tangxiangpi

2. I don't know the reason

Like I said, the reason is that you are getting the login challenge. You need to use the Python script above in that case

Torvin avatar Apr 02 '23 22:04 Torvin

Hello, how can I contact you by email, I have many questions to ask you, thank you very much

Torvin @.***> 于2023年4月3日周一 06:58写道:

  1. I don't know the reason

Like I said, the reason is that you are getting the login challenge. You need to use the Python script above in that case

— Reply to this email directly, view it on GitHub https://github.com/TwidereProject/Twidere-Android/pull/1482#issuecomment-1493460206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEJKVLWB3IBU76ZM6F6A4PDW7IAAPANCNFSM6AAAAAAURQB5C4 . You are receiving this because you commented.Message ID: @.***>

tangxiangpi avatar Apr 03 '23 00:04 tangxiangpi

  1. I don't know the reason

Like I said, the reason is that you are getting the login challenge. You need to use the Python script above in that case

The Python script has a url address that returns 302, you can read my comment in githu.io

tangxiangpi avatar Apr 06 '23 07:04 tangxiangpi

The Python script has a url address that returns 302, you can read my comment in githu.io

if it doesn't work anymore - that means something has changed yet again and you will have to find another way to login. either way it has nothing to do with this PR

Torvin avatar Apr 06 '23 07:04 Torvin

Any blocks to merging this now, @Tlaster ? From my perspective it's simple and brings the app back to functional.

obar avatar Jul 11 '23 15:07 obar

See my post here - https://github.com/TwidereProject/Twidere-Android/issues/1475#issuecomment-1646559952 but this doesn't seem to change anything any more in terms of allowing more access. Possibly an even newer version number is needed?

fusenuk avatar Jul 22 '23 11:07 fusenuk

See my post here - #1475 (comment) but this doesn't seem to change anything any more in terms of allowing more access. Possibly an even newer version number is needed?

You are right, everything is broken now for reasons unrelated to this PR - twitter simply shut down some endpoints that were used by Twidere (and other apps). Since this is project seems abandoned, the only viable solution now is to fork it and update the code to use new endpoints. There's not much point in merging this PR anymore 😞

Torvin avatar Jul 23 '23 03:07 Torvin

Where did you find the key? https://gist.github.com/pvieito/ee6d2c8934a8f84b9aeb467585277b8a。 That's Invalid.

Here is the real link: https://gist.github.com/pvieito/ee6d2c8934a8f84b9aeb467585277b8a

ghost avatar Aug 05 '23 10:08 ghost