Posting to Twitter without showing Popup.

Hi people!

I would like to send a tweet on iOS using social plugin, without showing the pop up panel. Means, once the user press tweet button, it will automatically send to twitter. I seen a few other iOS app able to do this (using build in Twitter, I think)

Anyone does this? Can Corona support it?

Try the GGTwitter library.

https://github.com/GlitchGames/GGTwitter

There is also the Twitter sample app in the SampleCode/Networking/Twitter folder

I am fully aware of the Twitter sample and GGTwitter, and been using it in a few of my previous apps. The problem is, user are require to key in their username/password, and some slow loading webview.

What I want to achieve, is a smooth login, using iOS built in Twitter, without user to key in their password/username again.

The “social” plugin will use the login credentials of iOS, however you’ll get a popup with the tweet that the user will need to confirm.

Yup, that’s the drawback. In fact, I would like to implement “Login With Twitter” function, where I can at least grab the user’s twitter id to submit to server & create new account. But seems like with Corona, I can only use the ugly webview Twitter and make my user key in their username & password again.

The “good” thing though is that they only need to key in their id/password the first time they use the app.

This is not a feature supported for Corona SDK.  I’m trying think of an app that uses the iOS login credentials that bypasses a post dialog.  Any app that uses it as part of the sharing dialog goes through the post dialog. 

It might be possible to do with Enterprise, but I have a feeling even then Apple is going to push you through a dialog.

If you want to post twitter messages directly without user interaction, I still think GGTwitter is the best solution as it only requires the user to enter their ID/password the very first time they use the app. This is only done once for the lifetime of your app on their device. After that your app can post as many twitter messages you want without any user interaction at all.

The only time a user needs to re-enter an ID/password again is if they delete and re-install the app, or if you call twitter:deauthorize() which you shouldn’t do.

Try the GGTwitter library.

https://github.com/GlitchGames/GGTwitter

There is also the Twitter sample app in the SampleCode/Networking/Twitter folder

I am fully aware of the Twitter sample and GGTwitter, and been using it in a few of my previous apps. The problem is, user are require to key in their username/password, and some slow loading webview.

What I want to achieve, is a smooth login, using iOS built in Twitter, without user to key in their password/username again.

The “social” plugin will use the login credentials of iOS, however you’ll get a popup with the tweet that the user will need to confirm.

Yup, that’s the drawback. In fact, I would like to implement “Login With Twitter” function, where I can at least grab the user’s twitter id to submit to server & create new account. But seems like with Corona, I can only use the ugly webview Twitter and make my user key in their username & password again.

The “good” thing though is that they only need to key in their id/password the first time they use the app.

This is not a feature supported for Corona SDK.  I’m trying think of an app that uses the iOS login credentials that bypasses a post dialog.  Any app that uses it as part of the sharing dialog goes through the post dialog. 

It might be possible to do with Enterprise, but I have a feeling even then Apple is going to push you through a dialog.

If you want to post twitter messages directly without user interaction, I still think GGTwitter is the best solution as it only requires the user to enter their ID/password the very first time they use the app. This is only done once for the lifetime of your app on their device. After that your app can post as many twitter messages you want without any user interaction at all.

The only time a user needs to re-enter an ID/password again is if they delete and re-install the app, or if you call twitter:deauthorize() which you shouldn’t do.

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.

Twitter Facade 1.3 also works, but you’ll need to create a twitter app to authenticate your posts.

http://www.silverthorax.com/libs/twitter-facade

I just verified this today, so I know it works.

Hi

I read somewhere that Twitter Facade doesn’t work so that’s why I never bought it.

Have you downloaded Twitter Facade recently and got it working?

GGTwitter looked simple so I’m worried that I will run into the same issues I had with GGTwitter?

I appreciate your reply roaminggamer :smiley: