local HttpService = game:GetService("HttpService")
local TwitterUserName = "EXAMPLEUSER"
local BearerToken = "EXAMPLE"
local Twitter_URL = "https://api.twitter.com/1.1/followers/list.json?cursor=-1&screen_name=" .. TwitterUserName .. "&skip_status=true&include_user_entities=false"
local headers = {
["Authorization"] = "Bearer " .. BearerToken,
["Content-Type"] = "application/json"
}
local function getTwitterFollowers(url)
local response
local success, errorMsg = pcall(function()
response = HttpService:GetAsync(url, true, headers)
end)
if not success then
warn("Failed to get data from Twitter: " .. tostring(errorMsg))
return nil
end
return HttpService:JSONDecode(response)
end
local followersData = getTwitterFollowers(Twitter_URL)
if followersData then
print("Followers data fetched successfully!")
else
print("Failed to retrieve followers data.")
end
So im trying to make a verification system but i first want to make a system that checks if X user is following user Y
I seem to be having issues here
local headers = {
["Authorization"] = "Bearer " .. BearerToken,
["Content-Type"] = "application/json"
}
With content type being and error, and when i remove it, i get another bad request saying my bearer token has “%” and needs to be decoded. Could someone suggest what to do?