InstagramPlugin icon indicating copy to clipboard operation
InstagramPlugin copied to clipboard

Share Cancelled?

Open chris-cooper opened this issue 10 years ago • 12 comments

I'm getting "Share Cancelled" on what seems like a valid share in Android. This even happens from the demo app if I add a check on err. The share seems to go through OK and I'm left on the home screen of Instagram showing the new photo in the feed. I then hit the back arrow to get back to the calling app, and I think this is being interpreted as a cancel. Is there another way I should be leaving instagram to get back to my app after a share? This is on a Nexus 5.

chris-cooper avatar Nov 20 '14 05:11 chris-cooper

The share result is handled here. According to Android documentation there are only two valid options returned by an activity: Activity.RESULT_OK or Activity.RESULT_CANCELED, which are both handled in the plugin.

Sounds strange, but this can come from Instagram application...

vstirbu avatar Nov 20 '14 06:11 vstirbu

Can you share your OS and Instagram app version?

vstirbu avatar Nov 20 '14 06:11 vstirbu

Thanks @vstirbu. This is on Instagram 6.10.1 and Android 4.4.4.

chris-cooper avatar Nov 20 '14 07:11 chris-cooper

Same behaviour on Android 5.0. The only way back to the application is to hit the back arrow.

I remember that on older Instagram when the share flow is done it took you back to your app and then the share message was successful. Does anyone still have older version to confirm this behaviour?

vstirbu avatar Nov 20 '14 18:11 vstirbu

I have been testing this action and indeed, in this version at least, there is no way to go back to the application automatically, nevertheless I do get a success message after I execute the share, apparently the situation comes from Instagram, I will check the logs that they produce to see if I find a problem

micheltobon avatar Nov 25 '14 15:11 micheltobon

anything new on this one?

vstirbu avatar Mar 24 '15 20:03 vstirbu

Confirmed to be happening today. one possible reason could be:

The Intent to share seems to be one-way...because once you share the photo, it redirects you to Instagram's main feed. To return to my app (where the plugin initiated the share), I either back out of the Instagram app altogether, or via the "recent apps" screen...

firoze avatar Jun 03 '15 12:06 firoze

I guess they updated the way their Intents work because they don't talk about RESULT_OK or RESULT_CANCELED anymore...

firoze avatar Jun 03 '15 12:06 firoze

Hello mates, I can confirm this happening... the intent is not returning RESULT_OK in ANY case, and Instagram is directing the user to their feed automatically, what I did to create a "workaround" was to launch a "local notification" to suggest the user to come back to our application since he receives a prize for posting certain hashtags, but of course I had to do a server-side query to Instagram to see if the image was in fact posted. I guess our hands are tied here

micheltobon avatar Jun 03 '15 13:06 micheltobon

If you have the error "Share Canceled" the problem can also be that you haven't shared a photo before on Instagram. You should tap on the camera inside the instagram app. Instagram will then ask for access to your photos. After you accepted that the error could be gone.

spottuit avatar Feb 25 '16 10:02 spottuit

Same issue here, going back with the back-arrow will result in a 'Share Cancelled' error. Using Android 4.4.2, with the latest instagram app.

Bart-Holland avatar Mar 16 '16 08:03 Bart-Holland

The result of the share operation is not reliable because the Instagram app does not return the correct response.

I'm going to lock this conversation until there is a change in Instagram app behaviour. If a future version of Instagram will fix it the plugin will handle it.

vstirbu avatar Mar 16 '16 09:03 vstirbu