GGTwitter: Let's settle this.

haha good for you! I’m in a similar boat. Twitter and Facebook implementations are my final move.

Honestly, I’m probably not qualified in any way to try to solve a technical issue like this, but just incase it gives anyone else a head start, I’ll share significant things I discover. (I’m pretty sure I’ll need Mr. Ranson’s heroics sometime soon.)

1). “Connections to api.twitter.com will be restricted to TLS/SSL connections only.”   As far as I know, SSL simply put means the “http” prefix has an “s”, which creates “https.”  Twitter now wants “httpS” exclusively. 

I searched the GGTwitter file and found two cases of “http”, and both were in links for api.twitter.com

Now, here’s the weird part, api.twitter.com doesn’t exist. ??? 

2). Line 18 in the oAuth.lua file provided by GlitchGames on GitHub reads:

local http = require("socket.http")

All I see here is an “http” with no “s”. I have no idea if it’s significant, and I have no idea what to make of this. I’m just sharing. 

Well, I have some good news and I have some neutral news. :slight_smile: The neutral news is everything I said above is rather irrelevant. The good news is all that irrelevance led me to the pleasantly easy and simple fix! I’ve tested it multiple times on a device, and it has functioned brilliantly. 

Here is what you must do:

--oAuth.lua provided by GlitchGames on GitHub --Line 244 native.showWebPopup( display.screenOriginX, display.screenOriginY, fullX, fullY, "http://api.twitter.com/oauth/authorize?oauth\_token=" .. twitterRequestToken, { urlRequest = listener } ) --Line 355 oAuth.makeRequest( "http://api.twitter.com/" .. self.apiVersion .. "/friendships/create.json", params, self.consumerKey, self.accessToken, self.consumerSecret, self.accessTokenSecret, "POST", postCallback ) --Locate the url in each line and change "http" to "https." 

It’s that simple! I can now authorize, follow, and post in my app using GGTwitter.

Nice! Thanks. Going to be throwing this in today. 

How timely!  I made those changes, and it works.

Thanks Nathan!

You are so welcome! I’m extremely thrilled that I could help some people out!

Hey everyone, Graham here from Glitch. Sorry I couldn’t get to this sooner but we’ve been away all weekend and only just back in the Office. Incredibly happy to see that you’ve already managed to fix the issue though, that’s awesome! I put those fixes directly into GGTwitter now so you should be able to get the latest version from GitHub.

Thanks for finding and fixing the issue!

Hello, 

Thanks first @GlitchGames for awesome GGTwitter sharing. But I got an error return while post a screenshot:

{"errors":[{"message":"Bad Authentication data","code":215}]} 

Of course, the simple text post is working. But every post with “Authorization” header type are all went wrong. Anyone gets a clue?

Thanks first for help.

So I guess I’ll say the first thing to lure somebody in… :wink:

I’ve been going at this simply just to get Twitter successfully authorized. Here’s what I have:

local GGTwitter = require( "GGTwitter" ) local twitter local twitterListener = function( event ) if event.phase == "authorised" then print( "Twitter was authorized" ) else print( "Twitter was not authorized" ) end end twitter = GGTwitter:new( "xxxxxxx", "xxxxxxxxxxxxxx", twitterListener, "https://mycallbackurl.com" ) if twitter:isAuthorised() == false then twitter:authorise() else print("Twitter is already authorised.") end 

I’ve tried a good amount of variations and such, but I come across the same issue when testing on a device. Using this in the Corona simulator is a complete success, but when I test on a device I can see some action then the app goes white with a message that says, “SSL is required.” This error is what I must solve. 

Has anyone had a similar experience?

Nathan

I would suggest contacting Graham.

Excellent idea! I actually attempted last night, so I’ll wait patiently for a response. 

Pertaining to my SSL story, I just saw a message on the twitter developer site that says as of January 14th the Twitter API requires SSL/TLS for all connections. This is somewhat encouraging to know. The statement included a link:

https://dev.twitter.com/discussions/24239

I believe this is crucial for anyone using OAuth for their Twitter implementation. I’m about to read the post, click some links, and attempt to set my app straight. I’ll share any breakthroughs. 

Nathan

Let us know what you find. I am about to release my game but first need to implement twitter. Was about to get started on it last night, glad I chose a different route and ended up having a BBQ and some wonderful mixed drinks.

haha good for you! I’m in a similar boat. Twitter and Facebook implementations are my final move.

Honestly, I’m probably not qualified in any way to try to solve a technical issue like this, but just incase it gives anyone else a head start, I’ll share significant things I discover. (I’m pretty sure I’ll need Mr. Ranson’s heroics sometime soon.)

1). “Connections to api.twitter.com will be restricted to TLS/SSL connections only.”   As far as I know, SSL simply put means the “http” prefix has an “s”, which creates “https.”  Twitter now wants “httpS” exclusively. 

I searched the GGTwitter file and found two cases of “http”, and both were in links for api.twitter.com

Now, here’s the weird part, api.twitter.com doesn’t exist. ??? 

2). Line 18 in the oAuth.lua file provided by GlitchGames on GitHub reads:

local http = require("socket.http")

All I see here is an “http” with no “s”. I have no idea if it’s significant, and I have no idea what to make of this. I’m just sharing. 

Well, I have some good news and I have some neutral news. :slight_smile: The neutral news is everything I said above is rather irrelevant. The good news is all that irrelevance led me to the pleasantly easy and simple fix! I’ve tested it multiple times on a device, and it has functioned brilliantly. 

Here is what you must do:

--oAuth.lua provided by GlitchGames on GitHub --Line 244 native.showWebPopup( display.screenOriginX, display.screenOriginY, fullX, fullY, "http://api.twitter.com/oauth/authorize?oauth\_token=" .. twitterRequestToken, { urlRequest = listener } ) --Line 355 oAuth.makeRequest( "http://api.twitter.com/" .. self.apiVersion .. "/friendships/create.json", params, self.consumerKey, self.accessToken, self.consumerSecret, self.accessTokenSecret, "POST", postCallback ) --Locate the url in each line and change "http" to "https." 

It’s that simple! I can now authorize, follow, and post in my app using GGTwitter.

Nice! Thanks. Going to be throwing this in today. 

How timely!  I made those changes, and it works.

Thanks Nathan!

You are so welcome! I’m extremely thrilled that I could help some people out!

Hey everyone, Graham here from Glitch. Sorry I couldn’t get to this sooner but we’ve been away all weekend and only just back in the Office. Incredibly happy to see that you’ve already managed to fix the issue though, that’s awesome! I put those fixes directly into GGTwitter now so you should be able to get the latest version from GitHub.

Thanks for finding and fixing the issue!

Hello, 

Thanks first @GlitchGames for awesome GGTwitter sharing. But I got an error return while post a screenshot:

{"errors":[{"message":"Bad Authentication data","code":215}]} 

Of course, the simple text post is working. But every post with “Authorization” header type are all went wrong. Anyone gets a clue?

Thanks first for help.

Does anyone else have this issue where if you are testing on a device and say you decide not to sign in to Twitter to post a tweet there is no way to back out and go back to the game without having to start the game all over again?

Like is there a way to make a listener that closes the I believe it’s a pop up window right?

Does anyone else have this issue where if you are testing on a device and say you decide not to sign in to Twitter to post a tweet there is no way to back out and go back to the game without having to start the game all over again?

Like is there a way to make a listener that closes the I believe it’s a pop up window right?