nitter icon indicating copy to clipboard operation
nitter copied to clipboard

[Enhancement] Following/followers lists

Open stemy2 opened this issue 5 years ago • 12 comments

Hello,

For now, we can't see the list of persons following/being followed by someone. We can only see the number, not the persons. Is the functionality implementable ?

stemy2 avatar Jun 11 '20 14:06 stemy2

I believe it is implementable yes, I played around with the required endpoints many moons ago

zedeus avatar Jan 03 '22 01:01 zedeus

I believe it is implementable yes, I played around with the required endpoints many moons ago

Hi Zed, is there a way to share more info on this? I am interested if we are able to get a full list or at least some number of followers of a certain account?

Would be grateful if you can point me somewhere, even its includes a solution outside of Nitter. And yeah, trying to do this without a Twitter Developer account.

shtefcs avatar Feb 20 '22 00:02 shtefcs

@shtefcs Following: https://api.twitter.com/1.1/friends/list.json?screen_name=<username> Followers: https://api.twitter.com/1.1/followers/list.json?screen_name=<username>

zedeus avatar Feb 20 '22 00:02 zedeus

wow that was fast and very interest. I just tried to query, but getting {"errors":[{"code":215,"message":"Bad Authentication data."}]}

I guess this not requiring any authentication?

shtefcs avatar Feb 20 '22 00:02 shtefcs

You need to authenticate using a guest token. curl 'https://api.twitter.com/1.1/guest/activate.json' -H "authorization: Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw" -X POST

Then take the token you get, and use the endpoints like this: curl 'https://api.twitter.com/1.1/followers/list.json?screen_name=elonmusk' -H 'authorization: Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw' -H 'x-guest-token: <token>'

zedeus avatar Feb 20 '22 00:02 zedeus

You need to authenticate using a guest token. curl 'https://api.twitter.com/1.1/guest/activate.json' -H "authorization: Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw" -X POST

Then take the token you get, and use the endpoints like this: curl 'https://api.twitter.com/1.1/followers/list.json?screen_name=elonmusk' -H 'authorization: Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw' -H 'x-guest-token: <token>'

Thank you a lot! Will share with my team mates this and see how it goes.

Is there any limit on followers response, how many followers u can get?

shtefcs avatar Feb 20 '22 01:02 shtefcs

Not that I know of, just use the cursor (in next_cursor_str, add as query parameter using min_position or max_position not sure which one) to get the next page of responses

zedeus avatar Feb 20 '22 01:02 zedeus

okay, thanks mate alot. Nitter is really great project, we wanted to use it in our project, but looked like overkill, specially now that you shared those API accesses.

shtefcs avatar Feb 20 '22 01:02 shtefcs

I tried the APIs but this seems to only bw working on the "old" v1.1 API with the guest token. This means that we can implement this feature but if Twitter removes the v1.1 we can't do anything since the v2 or graphql api seems it does not work.

cypherbits avatar Aug 26 '22 15:08 cypherbits