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

shareSingle Share.Social.FACEBOOK not open FB Lite Apps #664

Closed
brambang opened this issue Jan 7, 2020 · 4 comments
Closed

shareSingle Share.Social.FACEBOOK not open FB Lite Apps #664

brambang opened this issue Jan 7, 2020 · 4 comments
Labels
bug stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@brambang
Copy link

brambang commented Jan 7, 2020

Steps to reproduce

const shareOptions = {
  title: shareTitle,
  message: shareMessage,
  social: Share.Social.FACEBOOK
};
Share.shareSingle(shareOptions);

Expected behaviour

Open FB apps (FB Lite installed) or play store.

Actual behaviour

Not open FB Lite
error showing:

Object {
  "error": "url",
}

UPDATE:

  1. I add URL, then it would open a browser
    But, why we have to add an URL??
    I want to send message only.
    is it bug??
    (as i check the redirect URL contain url as query get in FacebookShare.java)

  2. I install FB apps, yes it works open the apps.
    But the problem why there is no messages??
    same issue when we use Share.open
    is it any other way to share a message (quote)?

Environment

  • React Native version: 0.58
  • React Native platform + platform version: Android

react-native-share

Version: 1.2.1

@brambang brambang added the bug label Jan 7, 2020
@brambang
Copy link
Author

brambang commented Jan 8, 2020

UPDATE 2:

  1. i have workaround to make shareSingle FB to check both of FB apps & FB Lite.

i am edit FacebookShare.java in android/src/main/java/cl/json/social/
and using getPlayStoreLink to add FB lite package name

private static final String PACKAGE_LITE = "com.facebook.lite";
@Override
protected String getPlayStoreLink() {
    return PACKAGE_LITE;
}

and open SingleShareIntent.java in android/src/main/java/cl/json/social/
and in row 34 add else if to check getPlayStoreLink as package

...
} else if (this.isPackageInstalled(getPlayStoreLink(), reactContext)) {
    System.out.println("INSTALLED");
    this.getIntent().setPackage(getPlayStoreLink());
    super.open(options);
} else {
...

as i check this work around works as expected and no problem in other apps singleShare.

  1. BUT IM STILL CANNOT POST MESSAGE IN FB APPS.
    FB Lite has different behaviour, i can post message in it.

@stale
Copy link

stale bot commented Mar 8, 2020

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.

@stale stale bot added the stale There has been a lack of activity on this issue and it may be closed soon. label Mar 8, 2020
@stale
Copy link

stale bot commented Mar 15, 2020

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

@stale stale bot closed this as completed Mar 15, 2020
@Ahmed-Imam
Copy link

I am still experiencing this issue with the latest version of react-native-share, it works fine on instagram, the issue happens only on facebook in my end. any updates on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

1 participant