-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[TwitterBridge] Add support for OAuth authorization. #3628
Conversation
- Add OAuth authorization header. - Add new endpoint.
- Make some changes to support new endpoint.
Pull request artifacts
|
as i understand it, just a few days ago the twitter bridge broke? is that correct? pls give summary update |
yes, it broke again. Some endpoint no longer work or output only most liked tweet when using guest token so I have to find a new way. Luckily, there are people at nitter find out how to get it working with guest account. You can see how to generate it at the link on the top. Also it's not feasible for larger instance to implement this with single guest account, nitter have to use a lot of guest account to make it work for larger userbase. |
sorry your pr confuses me a bit. are you trying to preserve the old method? (which is broken) also please remove all code which is no longer in use |
What do you mean about old method? Do you refer to guest token or graphql api? |
think i mean the graphql api urls changing |
I change the graphql api for fetchTimeline function to make it work with OAuth authorization. The consumer key i use to make OAuth is from Android and the old graphql api is from the web so it will not work with OAuth i created. About earlier question - i think yes. I still use graphql api to fetch tweet. |
merging without testing this. hope it works |
I can confirm that this is working. However is it possible to add the tokens to config.ini.php instead as otherwise if TwitterClient.php if updated things may break. |
* Update TwitterClient.php - Add OAuth authorization header. - Add new endpoint. * Update TwitterBridge.php - Make some changes to support new endpoint. * Update TwitterBridge.php * clean up, fix warning * fix warning * fix warning * remove oauth token * fix wrong twitter id when encounter reply post. * Update TwitterClient.php * fix wrong twitter id cause by previous commit * clear warning * attempt to clear warning * attempt to clear warning
[TwitterClient]
[TwitterBridge]
NOTE: This latest change requires you to get the guest account to generate OAuth headers in order to use the bridge. Detail about how to get it is on zedeus/nitter#issuecomment-1681199357. After that, put it on the TwitterClient file and you will be good to go. Also it's not recommended to use one guest account for larger instance, i saw nitter use a lot of guest accounts over there to handle large requests.