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

How to share images to social apps #3267

Closed
mrishan1993 opened this issue Jan 19, 2019 · 3 comments
Closed

How to share images to social apps #3267

mrishan1993 opened this issue Jan 19, 2019 · 3 comments
Assignees

Comments

@mrishan1993
Copy link

This is the code I am using

Share.share({
            message: caption,
            url: "data:image/" + type + ";base64," + data,
            type: 'image/' + type,
            title: 'Gread'
          }, {
            // Android only:
            dialogTitle: 'Share this comic :)',
            // iOS only:
            excludedActivityTypes: [
              'com.apple.UIKit.activity.PostToTwitter'
            ]
          })

when i use this, share modal pops up, but i cant share any image.
although, I am able to share links and text

@EvanBacon
Copy link
Contributor

You cannot share images using Android. Some images you may want to share using the Linking API. This video Sharing in React Native may explain more of what you are looking for. Regardless the Share API, and the Linking API are not a part of Expo.

@EvanBacon EvanBacon self-assigned this Jan 19, 2019
@EvanBacon EvanBacon changed the title share images on social app How to share images to social apps Jan 19, 2019
@gbxnga
Copy link

gbxnga commented Jun 13, 2019

The new Expo SDK 33 has a Sharing API that lets you share images on IOS and Android.

Here's a snack that does that: https://snack.expo.io/@gbxnga/expo-react-native-share

@rahul-desai3
Copy link

rahul-desai3 commented Jun 13, 2019

@gbxnga Good to see that images can now be shared on Android, but looking at the doc for Sharing, I dont see a way to add a message along with the image.
Any idea?

@lock lock bot added the outdated label Dec 10, 2019
@lock lock bot locked and limited conversation to collaborators Dec 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants