如何使用reactjs中的react share在twitter上共享图像

如何使用reactjs中的react share在twitter上共享图像,reactjs,react-share,Reactjs,React Share,我无法使用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} />} /> 正在

我无法使用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,但它仍然不起作用。
我是否可以共享图像?

似乎您可以通过此响应将其作为base64 url共享,这非常酷和简单

因此,基本上设置url属性:

url: "data:image/png;base64,<base64_data>"

您正在使用库/包吗?