react-native-share / react-native-share

Social share, sending simple data to other apps.

Home Page:https://react-native-share.github.io/react-native-share

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image not sharing to WhatsApp

ErHarinderSingh opened this issue · comments

Hi there, I am using Google Pixel 7 Pro and not able to share images using share function. Initially it was working fine. I am on Android 14. Image is shareable to Fb, Instagram, Threads etc. social apps but not working for WhatsApp, only text is being shared.
Can anyone help with it?
Cc : @MateusAndrade

I believe you'll need to do a build to a real device and watch adb logcat to see what's happening. If it is not obvious from doing that in the first test, you may need to actually dive into the native android code and add logging statements around the share to whatsapp that log out to System.err exactly what native APIs are being called (with what parameters) when you call it, then log out what the response from whatsapp was after the share attempt

after collecting information like this you may know what's going on.

before doing that definitely make sure that whatsapp's package is in the list of valid share destinations for your app though. sounds like it was if it was working, but maybe something changed? logcat will show that as well I think

Hello, I'm facing the same issue (actually testing on iOS physical device).

Sharing an image (plus message) to Whatsapp is not working, only the message is shown. It is working fine with Telegram.

Share.open({ message: "Hey", url: item.uri })

But if I remove the 'message' parameter it is sending the image through Whatsapp.

Share.open({ url: item.uri })

I'll try to check the logcat with an Android device to get more info.

Same here: On my iPhone, sharing a file and a message simultaneously works with other apps but only sends the message when using Whatsapp.
If I send file + message, the file is ignored by whatsapp.
I I send file + title, the file is sent but title is ignored.

Seems like there's no way to have both file and text on Whatsapp.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open