как поделиться изображением firebase в социальных сетях с помощью react-share в react js?

#reactjs #react-share

#реагирует на #реагировать-делиться

Вопрос:

Здесь я использую react-шлем для обмена контентом .Но я настаивал на том, чтобы поделиться этим изображением .Он показывает только содержимое по умолчанию, определенное в URL-адресе общего доступа, но содержимое, которое я определил в мета-тегах, не работает. Вот мой код. Как я могу поделиться изображением .Заранее спасибо.

Helmet.js

 import { Helmet } from "react-helmet"; export default function HelmetMetaData(props) {  let currentUrl = "http://localhost:3000" ;  let quote = props.quote !== undefined ? props.quote : "";  let title = props.title !== undefined ? props.title : "react share ";  let image = props.image !== undefined ? props.image : "https://storage.googleapis.com/cmperstribe_storage_usha/Banner/IMG_3640.JPG";  let description = props.description !== undefined ? props.description : "orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recentlwith desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";  let hashtag = props.hashtag !== undefined ? props.hashtag : "#camperstribe"; return (  lt;Helmetgt;  lt;titlegt;{title}lt;/titlegt;  lt;meta charset="utf-8" /gt;  lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /gt;  lt;meta name="csrf_token" content="" /gt;  lt;meta property="type" content="website" /gt;  lt;meta property="url" content={currentUrl} /gt;  lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/gt;  lt;meta name="msapplication-TileColor" content="#ffffff" /gt;  lt;meta name="msapplication-TileImage" content="/ms-icon-144x144.png" /gt;  lt;meta name="theme-color" content="#ffffff" /gt;  lt;meta name="_token" content="" /gt;  lt;meta name="robots" content="noodp" /gt;  lt;meta property="title" content={title} /gt;  lt;meta property="quote" content={quote} /gt;  lt;meta name="description" content={description} /gt;  lt;meta property="image" content={image} /gt;  lt;meta property="og:locale" content="en_US" /gt;  lt;meta property="og:type" content="website" /gt;  lt;meta property="og:title" content={title} /gt;  lt;meta property="og:quote" content={quote} /gt;  lt;meta property="og:hashtag" content={hashtag} /gt;  lt;meta property="og:image" content={image} /gt;  lt;meta content="image/*" property="og:image:type" /gt;  lt;meta property="og:url" content={currentUrl} /gt;  lt;meta property="og:site_name" content="CampersTribe" /gt;  lt;meta property="og:description" content={description} /gt; lt;/Helmetgt; ); }  

Index.js

 lt;divgt;  lt;Headgt;  lt;titlegt;facebook clone next jslt;/titlegt;  lt;HelmetMetaDatagt;lt;/HelmetMetaDatagt;  lt;/Headgt;  lt;div className="h-screen bg-gray-100 overflow-hidden"gt;  lt;Header session={session}/gt;  lt;main className="flex"gt;  lt;Sidebar session={session}/gt;  lt;Feed posts={posts}myId={myId}session={session}/gt;  lt;Share/gt;  lt;/maingt;  lt;/divgt;  lt;/divgt;  

Share.js

 lt;FacebookShareButton  url={"https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=959514238108782amp;height=50amp;width=50amp;ext=1639482313amp;hash=AeQW9JjFvK4otTde01E"}  className="Demo__some-network__share-button"  gt;  lt;FacebookIcon size={32} round /gt;  lt;/FacebookShareButtongt;  lt;FacebookShareCount url={"https://peing.net/ja/"}gt;{shareCount =gt; lt;span className="myShareCountWrapper"gt;{shareCount}lt;/spangt;}lt;/FacebookShareCountgt;  lt;br /gt;  lt;WhatsappShareButton  title={"whatsapp"}  url={"https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=959514238108782amp;height=50amp;width=50amp;ext=1639482313amp;hash=AeQW9JjFvK4otTde01E"}  hashtags={["reactShare","reactJs"]}  gt;  lt;WhatsappIcon size={32} round /gt;  lt;/WhatsappShareButtongt;  lt;TwitterShareButton  title={"test"}  url={"https://peing.net/ja/"}  hashtags={["hashtag1", "hashtag2"]}gt;  lt;TwitterIcon size={32} roundgt;lt;/TwitterIcongt;   lt;/TwitterShareButtongt;