Problem posting image to Twitter

Text and image show up on my Android devices: (Using the official Twitter app)

Galaxy S1 (Android 2.3.6)

Galaxy Player 5.8 (Android 4.0.4)

Google Nexus 7 (Android 4.4.2)

I’m just tweeting a simple message and a screenshot display.captureScreen() saved as a png.

So far I haven’t had any problems, however this app isn’t live yet so I don’t know if I just happen to be lucky with my devices.

Thanks again!

I guess I figured it out. You can not share image from Resource Directory successfully all the time, but it will work 100% of the time from documents directory.

EDIT: BTW that is not a fix for GG Twitter issue the thread started about, but I’m happy with the social plugin.

@ingemar

Sadly this code now no longer works. Bizzare!

local options = { service = "twitter", message = "message", url = {urlLink}, image = { {baseDir = system.CachesDirectory, filename = "image.png"} }, } display.save(display.getCurrentStage(), "image.jpg", system.CachesDirectory) native.showPopup("social", options) 

Regardless of whether I use system.CachesDirectory, system.DocumentsDirectory or system.TemporaryDirectory

Inserting a delay of 1.5 seconds before the call to native.showPopup() make no difference either. Is your image sharing for Twitter still working?

Same buid (2288) same device Samsung Galaxy Tab 2 (4.2.2). I even tried deleting the standard Twitter app and re-installing. No luck.

Help!

MAS1

Huh! No it doesn’t work for me either. (latest daily build)
Something must’ve broke the Twitter image posting for android. ios is fine…

It’s a bit over 2:20am here now, but I’ll look into this first thing tomorrow morning.

OK…

I tested this with an app that was released a month ago on the Google Play Store. It was working then, but now the image is not attached to the Twitter post.

I see that the Twitter app was updated on May 19th, 2014 and I suspect that some breaking change was introduced, at least regarding Corona’s Social plugin.

The strange thing is that the Share dialog for the built-in Photos app can attach images with the new Twitter version. The sharing dialog looks different though, so maybe Corona is calling some different method… I don’t know.

iOS is not affected at all. It works as expected even though the Twitter app was updated on May 13th.

I’m going to file a bug report.

@ingemar - I appreciate you filing that bug report. My live app that did work successfully now no longer attaches images - ouch!  :frowning: .

@Corona - Please make this a high priority fix. It’s a show stopper for those of use integrating social media into Android. 

Best wishes,

MAS1.

Same here. My live app isn’t able to attach images to Twitter anymore either.

I was also going to push an update to some apps, but I will have to wait for this to be fixed before I do.

Hopefully it’s something CoronaLabs can do something about…

Reported as case 32972

I’ve got 30+ apps to move over from iOS to Android. Now they are all on hold.

The bigger picture is that this could break again in the future and we don’t know about the break soon enough. You’d think once something is tested and shipped it’d be unbreakable! That’s mobile for you.

It’s now 07:55 here in the UK!

Best wishes - MAS1

From what I can see this breakage is caused by the new Twitter app that was released on May 19.

I’m trying to see if I can get hold of an old version of the Twitter app and see if that is in fact the culprit.

@ingemar

What a great sleuth you are! I’ve encountered you on these forums before. If Corona don’t offer you a job at some point given the work you do on these forums then I’ll be amazed!

Good luck with your apps!

MAS1.

It’s confirmed!  

I downloaded an old version of Twitter (5.3.0) that was released April 1, 2014 which was the current version when I released my live app. It works perfectly, even with the test project I submitted in my bug report.

The current version of Twitter is 5.10.0, so something has changed in the way that it accepts image attachments.

The strange thing is that the builtin Android Photo app can attach images to Twitter without problems, so it must attach images in a different way than Corona does.

Excellent spot Ingemar!

I wonder how long this will take to fix? Hopefully days and not weeks…

MAS1

I am on my journey of social media integration and this is throwing a big ol’ wrench into it. Hopefully we’ll get a fix soon.

Issues with Facebook, Twitter, social plugins… this is why I stay in my basement and don’t talk to anyone. I will, however, come out when this gets fixed…

1098.gif

@Panc software,

Hilarious - love the humor!

+1 This needs fixing ASAP!  :smiley:

fwiw: i skipped the social plugin on android since it’s only half a solution anyway (twitter=ok, facebook=no), and “rolled my own” social module with separate solutions using facebook plugin (“me/photos”) and http://silverthorax.com/libs/twitter/ (no affiliation), in both cases using same captured image saved to temp dir, no problems noticed (as yet! cross fingers!!) with either, still using public build 2189.

@dave I’ve been trying to brainstorm my own solution, seeing as how any third-party (or first-party, in some cases) social media implementations seem to break every couple of months.

I do like your solution, even though it uses some paid software (not that that is in and of itself a bad thing) and I will be seriously considering it. Have you confirmed that the silverthorax option still posts text AND photos in the same tweet? This is the falling-down point we have come to in this thread.

as of yesterday afternoon, yes still working (photo + message), same as i originally implemented a month (-ish) ago, no recent changes. i use its table parameter syntax, just so i can specify callbacks, but i doubt it matters much - the “shortcut” syntax likely works identically (assume it just maps nils to the unspecified table params). only diff with table method is you must manually get the full file path (where shortcut method assumes just filename, and tries to ‘guess’ full path as needed).

i’m not affiliated, so not plugging their software, but i was in same boat a month ago, where nothing seemed to work (even back THEN - not social, not ggtwitter, …), and only thing i found that DID work was that. so, i just cross fingers that it continues to work, but honestly i have to do same with facebook plugin too. twitter and/or facebook could change something on the server-side tomorrow and break everything.

The strange thing, as jonjonsson notes above, other twitter clients don’t seem to accept both the text and the image. It’s either one or the other. I use Tweetcaster myself (it’s great, everyone should use it) but i can’t get it to post both images and comments. It did use to work from what I’ve read. Brutal.

I’m hoping that the bug report gets some traction, but there is another thread that was opened with this issue (specifically relating to GGTwitter) and the suggestion was to review twitter’s APIs to figure out why posting pictures isn’t working any more. Hopefully because this issue affects the social plugin the engineers will throw some eyeballs at it.

I sincerely hope engineering fix this soon.

The social plugin on Android is worthless. No Facebook (I understand why) and a severely broken Twitter. I don’t want to pay for a 3rd party solution - I’ve paid for the Corona solution! :wink:

Add that to the AdMob banner issue bug and Corona is rather frustrating me at the moment. Not good at all. :frowning:

MAS1

I share that sentiment, but that’s why I’m only on a basic subscription (for my personal use). About the only thing of interest for me at Pro is social, but on Android it doesn’t do facebook, and (currently) seems to be having trouble with twitter. Seriously? A “social” plugin that doesn’t do facebook or twitter?! So, Corona won’t get that extra $30/mo from me, as a one time $10 seemed the smarter investment. But if I had already paid for Pro, I’d be screaming for a fix just as loudly. (*and* for admob)