I know this is an old post but Iâve just spent 2 days trying to get GGTwitter to work to no avail.
I set up dev.twitter to get the keys, secret and so forth but got stumped on the Callback URL, I have no idea what it means or what itâs used for, after hours of searching and coming across countless other devs with the same issue I gave up. All you get is technical jargon from Twitter employees that doesnât make any sense what-so-ever.
I just made the callback URL my website address, itâs all I could think of.
Anyhow after adding oAuth.lua and multipartForm.lua and GGTwitter.lua to my project it looked as simple as this to post to TwitterâŚ
local GGTwitter = require( âGGTwitterâ )
twitter = GGTwitter:new( âkeyâ, âsecretâ )
twitter:authorise()
twitter:post( âCheck out my photo!â, âimage.pngâ )
Fat chance! It simply wonât authorise.
I read somewhere that you need to include the callback URL, set up in the Twitter Application settings, like thisâŚ
twitter = GGTwitter:new( âkeyâ, âsecretâ, callbackURL )
Still it wonât Authorise.
I put in a very long delay in case it needed time to connect and authorise, no luck.
Another thing, looking through the oAuth code I noticed it uses the system documents directory, this seems odd if you are trying to send an image with a tweet, surely it should be looking in the resource directory for images as the documents directory doesnât accept pngâs or jpgâs?
Still, I canât send even a simple message without an image either.
Iâve had to scrap the whole idea of using GGTwitter because apart from the basic usage, there are no other instructions, I have no idea if Iâm missing something, maybe something I have to put in the build settings perhaps, I donât know.
It doesnât help that Iâm building for Android so I have to keep building the app, uploading it to my device and testing it on my device as the simulator doesnât support this feature, itâs a very slow process of trial and error.
Something tells me that having only the starter version of Corona and that Iâm using Android might be the problem.
Now Iâm down to using a simple Twitter intent, using system.openURL and while it works I have run into another problemâŚ
system.openURL("https://twitter.com/intent/tweet?screen_name=???
How the hell am I supposed to find the users screen name to fill in the ??? Iâve searched high and low for the answer, itâs no use putting my screen name in there, I want the user to post a tweet on their time line not mine!
This is the last part of my project, the game is 100% finished, Iâve put in 4000 hours of work, my friends and family are totally hooked on it, it could be a hit if anyone ever finds it.
 Iâm also stuffed because I canât afford the $600 to go Pro to use the social plugin, even if I could it still doesnât support Twitter on Android.
Iâm caught in a catch22 situation, I was going to use any money I made from my first game to buy Pro for my next 3 projects but without social sharing my game might never be found.
ingemar, is there any chance you could help me getting the GGTwitter to work for me, you seem to have it working, can you walk me through it or point out anything I might have missed please, Iâm desperate.