我无法使用react-share在twitter上分享图片。我的代码是:
<TwitterShareButton
url={window.location.href}
title={props.data.breadcrumb}
imageURL={props.data.product_info.image_path}
children={<TwitterIcon size={32} round={true} />}
/>正在从api加载图像。我已将imageURL更改为media,但它仍然不起作用。我能不能分享图片?
发布于 2019-05-14 14:48:21
看起来你可以通过这个响应https://github.com/react-native-community/react-native-share/issues/119把它作为一个base64 url来分享,这很酷,也很简单。
所以基本上设置url prop:
url: "data:image/png;base64,<base64_data>"https://stackoverflow.com/questions/54440389
复制相似问题