Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a more modern Twitter Android version that works #1482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Torvin
Copy link
Contributor

@Torvin Torvin commented Feb 5, 2023

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 Torvin changed the title Update to the version that works Use a more modern Twitter Android version that works Feb 5, 2023
@Noremon
Copy link

Noremon commented Mar 14, 2023

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

@Torvin
Copy link
Contributor Author

Torvin commented Mar 14, 2023

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 😞

@Noremon
Copy link

Noremon commented Mar 14, 2023 via email

@tangxiangpi
Copy link

tangxiangpi commented Mar 31, 2023

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

@Torvin
Copy link
Contributor Author

Torvin commented Mar 31, 2023

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

@tangxiangpi
Copy link

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
Copy link

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?

@Torvin
Copy link
Contributor Author

Torvin commented Mar 31, 2023

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")

@tangxiangpi
Copy link

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?

@Torvin
Copy link
Contributor Author

Torvin commented Mar 31, 2023

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

@tangxiangpi
Copy link

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
Copy link

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

@Torvin
Copy link
Contributor Author

Torvin commented Apr 1, 2023

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

@tangxiangpi
Copy link

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

@Torvin
Copy link
Contributor Author

Torvin commented Apr 2, 2023

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

@tangxiangpi
Copy link

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
Copy link

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
Copy link

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

@Torvin
Copy link
Contributor Author

Torvin commented Apr 2, 2023

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

@tangxiangpi
Copy link

tangxiangpi commented Apr 3, 2023 via email

@tangxiangpi
Copy link

  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

@Torvin
Copy link
Contributor Author

Torvin commented Apr 6, 2023

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

@obar
Copy link

obar commented Jul 11, 2023

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

@fusenuk
Copy link

fusenuk commented Jul 22, 2023

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?

@Torvin
Copy link
Contributor Author

Torvin commented Jul 23, 2023

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 😞

@ghost
Copy link

ghost commented Aug 5, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error 261 happenned when try to post something or do other actions on twitter
5 participants