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.

Share instagram story is not work properly

See original GitHub issue

Steps to reproduce

I tried to run the next code:

import Share from 'react-native-share';

const shareToInstagramStoryUnsafe = async () => {
  const shareOptions = {
    backgroundImage:
      'https://hatrabbits.com/wp-content/uploads/2016/12/rare-combinaties.jpg',
    method: Share.InstagramStories.SHARE_BACKGROUND_IMAGE,
    social: Share.Social.INSTAGRAM_STORIES,
  };

  console.log(' --- xdebug shareOptions', shareOptions);

  const ShareResponse = await Share.shareSingle(shareOptions);

  console.log(' --- xdebug ShareResponse', ShareResponse);
};


shareToInstagramStoryUnsafe();

As a result I see next:

D/ViewRootImpl@1618a00[MainActivity]: ViewPostIme pointer 0
D/ViewRootImpl@1618a00[MainActivity]: ViewPostIme pointer 1
I/ReactNativeJS: ' --- xdebug shareOptions', { backgroundImage: 'https://hatrabbits.com/wp-content/uploads/2016/12/rare-combinaties.jpg',
      method: 'shareBackgroundImage',
      social: 'instagramstories' }
I/System.out: SHARE SINGLE METHOD
I/System.out: com.instagram.android
I/System.out: INSTALLED
I/ReactNativeJS: ' --- xdebug ShareResponse', { message: true, app: 'com.instagram.android' }
D/SensorManager: unregisterListener ::   
D/ViewRootImpl@1618a00[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@88a9ff6[MainActivity]
    getNavigationBarColor() -855310
D/ViewRootImpl@1618a00[MainActivity]: stopped(false) old=false
D/SensorManager: registerListener :: 1, LSM6DSO Acceleration Sensor, 66667, 0,  
D/ViewRootImpl@1618a00[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=14 res=0x1 s={true 522197549056} ch=false
D/ViewRootImpl@1618a00[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@88a9ff6[MainActivity]
    getNavigationBarColor() -855310

Expected behavior

Instagram story sharing should work properly

Actual behavior

After invoking .shareSingle(...) will be opened a new activity and very quickly closed and a result { message: true, app: 'com.instagram.android' } Instagram didn’t open

Also, I tried to use example/App.js and the same problem:

  • activity opened and closed immediately
  • result: { message: true, app: 'com.instagram.android' }

Environment

  • React Native version: 0.61.x
  • React Native platform + platform version: Android 10.

react-native-share

Version: 3.5.0

Link to repo (highly encouraged)

https://github.com/

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:21
  • Comments:51

github_iconTop GitHub Comments

13reactions
iammuhammadumarcommented, Jun 30, 2020

Also facing the same issue on android and working fine on IOS.

8reactions
retyuicommented, Jun 23, 2020

3e90a53a-25d1-4b69-a26e-d265c1eb8a05

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Share Someone Else's Instagram Story? The Reason ...
The main reason why you can't share someone else's Instagram Story is that you're not tagged in it. Namely, Instagram allows you to...
Read more >
Why can't I share Instagram stories? | Social Publi Blog
The most typical reason is that the person who publishes the original story has not allowed their followers to share. To mark it,...
Read more >
Why can't people share my Instagram story? - Instamber
Reason 1: Resharing is off · Open Instagram and tap on your profile. · Click on the three lines (or three-dots) in the...
Read more >
Why Can't I Share A Post to My Instagram Story?
Methode #1: Toggle to Reset Resharing · Step 1: Open Instagram and choose your account. · Step 2: In the upper right corner,...
Read more >
Why can't I share Instagram posts to My Story? 5 quick fixes
Reinstalling an app can often resolve seemingly random issues. If you do not see the 'share to story' feature in your app, you...
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