RegisterServerEvent('gcPhone:twitter_postTweets')
AddEventHandler('gcPhone:twitter_postTweets', function(message, image)
local sourcePlayer = tonumber(source)
local srcIdentifier = getPlayerID(source)
local xPlayer = ESX.GetPlayerFromId(source)
local players = GetPlayers()
local maven_datastore = MySQL.Sync.fetchAll("SELECT username FROM twitter_accounts WHERE identifier = @identifier", { ['@identifier'] = xPlayer.identifier })
for _, i in ipairs(players) do
TriggerClientEvent('co_notify:client:SendNotifys', i, { app = "twitter" , title = "@"..maven_datastore[1].username, content = message , source = i })
end
TwitterPostTweet(message, image, sourcePlayer, srcIdentifier)
end)