Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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.
Lua
branch: master

Fixed image posting

Fix for image posting form J&J Studios, thanks!
latest commit c7e7b547c8
@GrahamRanson GrahamRanson authored

README.md

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

Something went wrong with that request. Please try again.