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

[Android] [Facebook] can't share.open usual text message

ShepelE opened this issue · comments

Steps to reproduce

const message = "one-two-message"; //`${long}, ${lat}`;
void Share.open({
    title: message,
    message,
    failOnCancel: false,
});
  1. install facebook app on device
  2. call share menu (with given code sample)
  3. choose Facebook

Expected behavior

facebook app is opened, and text field is filled with "one-two-message" string

Actual behavior

facebook app is opened, but text is empty

Environment

  • React Native version: 0.71.7:
  • React Native platform + platform version: Android 11.0 (OnePlus 6T), Android 10 (Redmi Note 9 pro)
  • Typescript version: 4.2.3

react-native-share

9.4.1, 8.2.2 - the same behavior

Link to repo (highly encouraged)

On ios works as expected (all apps - fb, telegram, instagram, whatsapp)
On android all apps works as expected, except facebook (no text with .open and .shareSingle methods)

I've added

<queries>
    ...
    <package android:name="com.facebook.katana" />
    <package android:name="com.facebook.orca" />
    <package android:name="com.facebook.android" />
    <package android:name="com.example.facebook" />
    <package android:name="com.facebook.mlite" />
    <package android:name="com.facebook.lite" />
</queries>

I have all permissions needed:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

does anyone can share text to facebook?

another possible solution for me is to remove facebook from share menu, but I haven't found how to do that (I need messengers only, I don't need to share anything to facebook)

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