Twitter Integration

Hi 

Im trying to integrate twitter in my games.

I use the code in twitter sample code but no luck.

When i press my twitter button i get an Authorize “My Game” to use your account box and waits for sign in.

All i want is to tweet a simple sentence like i see it in other games.

Help plz :smiley:

Thank you

Have you set up an application on the Twitter developer site?  

You cannot just tweet from an app without Twitter knowing where the tweet is coming from, so you have to set up an application on their site first: https://dev.twitter.com/

Then you will need to take the authorisation key and secret from there, and plug them into the Twitter.lua file from the twitter sample code (and then integrate it into your own project).

Hi Alan , thnx for your help. So there is no way for a simple tweet mechanism like the one in Flappy Bird and many other games? One more question. GGTwitter is not working for me.Am i doing something wrong or the library is outdated?

I’ve never played flappy bird, so I don’t know how their twitter interface works, but if you just tap a button and it appears in your twitter feed (i.e. no dialog box shows up giving you a chance to edit the tweet), then they have setup Flappy Bird as a Twitter App on Twitter like Alan said.  GGTwitter requires the same setup.

Rob

Hi Rob , thnx for your help too.

In every game i have tried, after pressing the “tweet button” it appears the tweet and a send button.

I did the setup.Thats not my problem!!!My problem is that every time its asking for authorization!!!

I have thought something.Is it because of access token and access token secret?Should i replace them in twitter.lua?

Nope, that was wrong! Although I did tweet but only in my twitter account :slight_smile: Im working only with the sample code now.I did the setup and replaced the key/secret key.I press the tweet button, I sign in and nothing happens.

I’m sorry for the multiple posts.Rob I just found your Using Built-In Twitter (iOS) post.I wish i could find this sooner. That’s exactly what I want and works like a charm!!Thats what I want to do on android too!

There is a “Social” plugin for Android that does this.  It also supports Facebook, but you have to be Pro subscriber to use it.

Rob

Have you set up an application on the Twitter developer site?  

You cannot just tweet from an app without Twitter knowing where the tweet is coming from, so you have to set up an application on their site first: https://dev.twitter.com/

Then you will need to take the authorisation key and secret from there, and plug them into the Twitter.lua file from the twitter sample code (and then integrate it into your own project).

Hi Alan , thnx for your help. So there is no way for a simple tweet mechanism like the one in Flappy Bird and many other games? One more question. GGTwitter is not working for me.Am i doing something wrong or the library is outdated?

I’ve never played flappy bird, so I don’t know how their twitter interface works, but if you just tap a button and it appears in your twitter feed (i.e. no dialog box shows up giving you a chance to edit the tweet), then they have setup Flappy Bird as a Twitter App on Twitter like Alan said.  GGTwitter requires the same setup.

Rob

Hi Rob , thnx for your help too.

In every game i have tried, after pressing the “tweet button” it appears the tweet and a send button.

I did the setup.Thats not my problem!!!My problem is that every time its asking for authorization!!!

I have thought something.Is it because of access token and access token secret?Should i replace them in twitter.lua?

Nope, that was wrong! Although I did tweet but only in my twitter account :slight_smile: Im working only with the sample code now.I did the setup and replaced the key/secret key.I press the tweet button, I sign in and nothing happens.

I’m sorry for the multiple posts.Rob I just found your Using Built-In Twitter (iOS) post.I wish i could find this sooner. That’s exactly what I want and works like a charm!!Thats what I want to do on android too!

There is a “Social” plugin for Android that does this.  It also supports Facebook, but you have to be Pro subscriber to use it.

Rob