Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WhatsApp not sharing image #69

Open
iantierney opened this issue Mar 25, 2021 · 12 comments
Open

WhatsApp not sharing image #69

iantierney opened this issue Mar 25, 2021 · 12 comments

Comments

@iantierney
Copy link

Anyone else having trouble with whatsApp only sharing text, not an image?

Unity-Native-Sharing 1.0.5
iOS 14
WhatsApp 2.21.41.2

@NicholasSheehan
Copy link
Owner

https://stackoverflow.com/a/55688479

Turns out that Whatsapp doesn't like it, I'm looking into their API now to see what's possible

@iantierney
Copy link
Author

iantierney commented Apr 26, 2021 via email

@NicholasSheehan
Copy link
Owner

NicholasSheehan commented May 8, 2021

Done some more digging, it seems like the generic way of sharing doesn't allow both text and an image on WhatsApp

Even another Unity sharing plugin has the same issue

@iantierney
Copy link
Author

iantierney commented May 8, 2021 via email

@NicholasSheehan
Copy link
Owner

Yeah, if you don't pass any text then it's not added to the list of items to share, so the only thing in that list should be the image path

Ref:

if(textToShare != NULL && textToShare.length > 0) [items addObject:textToShare];

@NicholasSheehan
Copy link
Owner

Also i have a small amount off free time now and I've starting doing some maintenance now

@iantierney
Copy link
Author

iantierney commented May 10, 2021 via email

@NicholasSheehan
Copy link
Owner

I found a way to detect what app was shared to, but only after the share has completed, can't find anything about detecting what app was selected before the share is completed

@HarryJBushell
Copy link

Hey! Confusing development here - the Android version of WhatsApp allows sharing of text & images, seems like this is an iOS exclusive problem. Any idea why that is - or any update on this bug in general?

@NicholasSheehan
Copy link
Owner

NicholasSheehan commented May 18, 2022 via email

@HarryJBushell
Copy link

Yeah, I had a similar issue of Facebook and Instagram not sharing text, but it was a policy issue on their behalf. Hoped WhatsApp might be different bc the Android version doesn't have this issue. Ah well, thanks anyway!

@HarryJBushell
Copy link

Hey again @NicholasSheehan ! Is there a way we could somehow prioritise the image over the text, so that when we hit 'share', systems like whatsapp iOS (which only share one of the two) will prioritise images?

Failing that, how could I go about editing the plugin to only share images? I'm trying to dig around in the code and remove the bits which generate & send text, but I could use some guidance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants