Posting to twitter from roblox game

I have a game that is posting high score to a twitter account using a aws server as proxy. The roblox is simple enough:

– globals
– replace with your real service endpoint!
local URL = “http://localhost:8080/api/highscore

— post stuff

function postToService(user, ts)

local HttpService = game:GetService("HttpService")

local data = {
	username = user;
	timestring = ts;

local json = HttpService:JSONEncode(data)

print("making post now\n")
-- Make the request
local response = HttpService:PostAsync(URL, json)
-- The response will be the URL to the new paste (or an error string if something was wrong)


the web service example you can find under:
web service downloads
this part is primarily java

the rest is explained under
roblox game posting to twitter

I hope someone finds this helpful


Backtick: `

1 Like

this is useful for devs who wanna make twitter codes and some stuff like that idk

1 Like

this use case here is real time up to date information, in this case someone has taken over the daily leaderboard. in general there are other use cases for off loading information to a web service…