Skip to content
forked from ubraz/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.

Notifications You must be signed in to change notification settings

orekasep/GGTwitter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%