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.