Hello, I’m looking to implement a feature where it gives a bonus to players who are following a certain twitter account. I’ve tried using the Twitter API, but I am getting errors.
Code:
local twitter = require(game.ServerStorage.TwitterAPI)
twitter.init(game.ServerStorage.TestScript:GetAttribute("key"), game.ServerStorage.TestScript:GetAttribute("secret_key"))
local result = twitter.followers_id("twitterdev")
print(tostring(result))
They said using request async is a way to do it. Now my issue is actually trying to have authorization. I already got my consumer key and secret key, but I’m new to using HttpService so I have no clue how to go about this.
You need to use the Bearer token, unfortunately, as you’ve stated before Heroku doesn’t really accept ProxyService anymore so as a workaround I would suggest using a Glitch application to host a database that updates every 60 seconds with all of the users currently following you, then when you go in-game and insert your username, search through said database for the username, and return true/false depending on whether the username is found or not.
I really don’t remember the names of the endpoints that you need to use for this but I’m pretty sure it is in the v2 category and doesn’t require elevated access.
I wish you the best of luck and feel free to ask me anything else!