【发布时间】:2019-03-07 03:55:58
【问题描述】:
我试过 sharethis-reactjs https://libraries.io/npm/sharethis-reactjs 也反应分享https://www.npmjs.com/package/react-share。
我所能做的就是发送 url 或一些文本,我想发送一个带有一些文本的图像(只有图像也可以)。
网上的答案只针对 react-native ,我正在寻找 reactjs 中的解决方案。 我正在创建一个 PWA,以便它可以在手机上运行。
<InlineShareButtons
config={{
alignment: 'center', // alignment of buttons (left, center, right)
color: 'social', // set the color of buttons (social, white)
enabled: true, // show/hide buttons (true, false)
font_size: 16, // font size for the buttons
labels: 'cta', // button labels (cta, counts, null)
language: 'en', // which language to use (see LANGUAGES)
networks: [ // which networks to include (see SHARING NETWORKS)
'whatsapp',
'linkedin',
'messenger',
'facebook',
'twitter'
],
padding: 12, // padding within buttons (INTEGER)
radius: 4, // the corner radius on each button (INTEGER)
show_total: true,
size: 40, // the size of each button (INTEGER)
// OPTIONAL PARAMETERS
url: '', // (defaults to current url)
image: '', // (defaults to og:image or twitter:image)
description: 'custom text', // (defaults to og:description or twitter:description)
title: 'custom title', // (defaults to og:title or twitter:title)
message: 'custom email text', // (only for email sharing)
subject: 'custom email subject', // (only for email sharing)
username: 'custom twitter handle' // (only for twitter sharing)
}}
/>
谁能告诉我我可以在 image="" 中输入什么来分享图片或任何其他方式在 react js 中分享图片
【问题讨论】:
标签: javascript reactjs progressive-web-apps