Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 1.39 KB

README.md

File metadata and controls

71 lines (54 loc) · 1.39 KB

GGTwitter

GGTwitter makes it very easy to authorise your player with Twitter and post messages. Authorisation data is stored so that the user only has to login the first time.

oAuth.lua from here - https://github.com/breinhart/Corona-SDK-Tweet-Media/blob/master/utils/oAuth.lua multipartForm.lua from here - https://github.com/breinhart/Corona-SDK-Tweet-Media/blob/master/utils/multipartForm.lua

Basic Usage

Require the code
local GGTwitter = require( "GGTwitter" )
Create your Twitter object passing in your apps consumerKey, consumerSecret and optional listener
local twitter

local listener = function( event )
	if event.phase == "authorised" then
		
	end
end

twitter = GGTwitter:new( "XXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", listener )
Authorise twitter
twitter:authorise()
Tweet a message
twitter:post( "Hello, world!" )
Tweet a message with an image
twitter:post( "Check out my photo!", "image.png" )
Check if the user is authorised.
print( twitter:isAuthorised() )
Follow a user.
twitter:follow( "GlitchGames" )
Deauthorise the user
twitter:deauthorise()
Destroy the Twitter object
twitter:destroy()
twitter = nil

Update History

0.1

Initial release