GGTwitter Issues

So I have recently decided to implement twitter into my new game, but can’t get it to work.

I swear I have set up all the twitter stuff correctly.

When I do this:

(I replace the x’s with the API key and the API Secret)

local twitter = GGTwitter:new("xxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxx", listener) twitter:authorise() print(twitter:isAuthorised())

It prints false.

I can’t figure out why as the key and secret match exactly what is in the twitter developer page.

Since I am not authorized, I am unable to post tweets, which is what I am trying to do.

Let me know if anyone has any suggestions or ideas as to what may be the problem.

Thanks,

David

I haven’t used GG twitter so I might be wrong but seems it would need a little time to authorize?

What if you do

[lua]timer.performWithDelay(5000, function() print(twitter:isAuthorised()) end)[/lua]

Thanks for the suggestion and sorry for the late response, as I had school and stuff.

Unfortunately, this idea did not work, although it was a good idea.

Still stuck…

Thanks again,

David

You have a listener specified, probably you should use that? what comes into the listener?

[lua]local listener = function( event )

    print(event.phase)

end[/lua]

local listener = function( event ) print(event.phase) end local twitter = GGTwitter:new("xxxxxx", "xxxxxxxxxxx", listener) twitter:authorise()

This prints nothing unfortunately.

Once again x’s replaced with correct values.

Well, I couldn’t figure out the GGTwitter issues so I just migrated to the library included in the sample code.

Thanks for the help,

David

If you’re still interesting in GGTwitter, attempt including a callback url. You should set a callback url for your app at the twitter developer site and include it in your code as follows:

local twitter = GGTwitter:new("xxxxxx", "xxxxxxxxxxx", listener, "https://callbackurl.com")

I believe this is actually required. I don’t think it actually matters what url you use for testing, but before you send your app out you should change it to something productive (a twitter link).

Nathan

I’ve not been to the twitter API page in a while, but I remember the last time I tried to set one up, there was a checkbox or radio button way down the page that was easy to miss and without it, you’re app wont be setup correctly.  I would double check your twitter settings. 

Rob

I haven’t used GG twitter so I might be wrong but seems it would need a little time to authorize?

What if you do

[lua]timer.performWithDelay(5000, function() print(twitter:isAuthorised()) end)[/lua]

Thanks for the suggestion and sorry for the late response, as I had school and stuff.

Unfortunately, this idea did not work, although it was a good idea.

Still stuck…

Thanks again,

David

You have a listener specified, probably you should use that? what comes into the listener?

[lua]local listener = function( event )

    print(event.phase)

end[/lua]

local listener = function( event ) print(event.phase) end local twitter = GGTwitter:new("xxxxxx", "xxxxxxxxxxx", listener) twitter:authorise()

This prints nothing unfortunately.

Once again x’s replaced with correct values.

Well, I couldn’t figure out the GGTwitter issues so I just migrated to the library included in the sample code.

Thanks for the help,

David

If you’re still interesting in GGTwitter, attempt including a callback url. You should set a callback url for your app at the twitter developer site and include it in your code as follows:

local twitter = GGTwitter:new("xxxxxx", "xxxxxxxxxxx", listener, "https://callbackurl.com")

I believe this is actually required. I don’t think it actually matters what url you use for testing, but before you send your app out you should change it to something productive (a twitter link).

Nathan

I’ve not been to the twitter API page in a while, but I remember the last time I tried to set one up, there was a checkbox or radio button way down the page that was easy to miss and without it, you’re app wont be setup correctly.  I would double check your twitter settings. 

Rob

Rob is right, I had to check the read/write box, it defaults to read. Not sure if this will help or not. Hope it helps you as I’m new too.

Under permissions.

Rob is right, I had to check the read/write box, it defaults to read. Not sure if this will help or not. Hope it helps you as I’m new too.

Under permissions.