Suncurve
(Suncurve)
December 11, 2021, 10:32am
1
Hi there, I’m trying to check if a aplayer is following someone on twitter, as I’ve seen this in another game.
Here’s the code I’m using so far:
game.ReplicatedStorage.GetFollowerList.OnServerEvent:Connect(function(Handle)
local Results = Http:GetAsync('https://api.twitter.com/1.1/followers/list.json?user_id=1255370872770236418&cursor=-1&screen_name=ChainLemonade&skip_status=true&include_user_entities=false')
Results = Http:JSONDecode(Results)
print(Results)
end)
(From GET followers/list | Docs | Twitter Developer Platform )
However, I just get a Bad Request 400 error.
Anyone know why, and how I can fix this? HTTP is in enabled, and I’m in studio.
1 Like
Judgy_Oreo
(Judgy_Oreo)
December 11, 2021, 11:07am
2
Attempting to go to the URL, it shows this:
{"errors":[{"code":215,"message":"Bad Authentication data."}]}
I’m not familiar with the Twitter API, but I’m guessing you need a login cookie/header.
Edit: Looking at the documentation for the Twitter API, there’s a message at the top of the page saying you need a developer account to use the API, so I’m pretty sure you just need to give the login token/cookie in the HTTP request.
Forummer
(Forummer)
December 11, 2021, 2:13pm
3
You likely need some sort of private API key.
you still need help? dm basicallyrbx#0800 and I’ll walk you through it
1 Like
Can you post here the solution to fixing this error?