question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Facebook iOS not working

See original GitHub issue

Steps to reproduce

  1. Use shareSingle

This is what I am doing:

const shareOptions = {
      url: picture.uri, // <<<< dynamic
      social: social === 'instagram' ? Share.Social.INSTAGRAM : Share.Social.FACEBOOK,
    };

    Share.shareSingle(shareOptions)
      .then((res) => { console.log(res); })
      .catch((err) => { err && console.log(err); });

Expected behaviour

Open the Facebook app to share the image.

Actual behaviour

Safari will open and I have the following image: href should represent a valid URL. The console.log of the promise tells me that the application is not installed (instead it is installed). screenshot 2018-10-17 at 17 44 58

Environment

  • React Native version: 0.57.1
  • React Native platform + platform version: iOS 12

react-native-share

Version: master (1.1.2)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
matthiasthomascommented, May 14, 2020

Experiencing the same issue. Instagram is working fine but facebook just opens up facebook.com on Safari with the following error href should represent a valid URL.

Here’s the code:

Share.shareSingle({
  url: asset.assetUri,
  social: Share.Social.FACEBOOK,
});

and I do have facebook in LSApplicationQueriesSchemes:

<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>instagram-stories</string>
		<string>instagram</string>
		<string>facebook</string>
		<string>whatsapp</string>
		<string>message</string>
        ...

EDIT: Ok actually the issue is only with the doc 🙂, the query scheme for facebook is not facebook but fb, so just add fb to your LSApplicationQueriesSchemes array and it’s going to work just fine!

1reaction
navasiloycommented, Feb 28, 2020

You can use Linking.canOpenURL('fb://') to detect if it’s installed or not

Read more comments on GitHub >

github_iconTop Results From Across the Web

Something's not working with the Facebook app for iOS.
Something's not working with the Facebook app for iOS. ... If you're having trouble downloading the app, check your internet connectivity. For best...
Read more >
How to Fix issues with the Facebook App on iPhone
If you are having issues with the Facebook app on your iPhone device, the first thing you need to do is to quit...
Read more >
Facebook not working on iPhone today? – 7 Fixes
1 Issue: Facebook not loading at all · 2 Switching from Safari to the official Facebook app · 3 Check your internet connection...
Read more >
How to Fix Facebook App Not Loading or Working on iPhone
Solution 1: Force Quit the Facebook App ... One of the most effective methods to troubleshoot this issue is by clicking on the...
Read more >
Facebook Not Working on iPhone and iPad? Here's The Real ...
Quit and Relaunch the App · Fix Internet Connectivity Issues · Check Restrictions for Facebook · Check Facebook Update · Clear History and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found