score:3
Accepted answer
The annswer I implemented is the following. Assume the Facebook URL is
https://www.facebook.com/sharer.php?u=https:example.com?imageurl=${this.state.imageUrl}}
You can append the dynamic image URL to the imageurl
attribute and facebook's crawlers will go to https:example.com/imageurl=https://imageurl.url.com
.
Then, you must extract the query parameters and append the imageurl
-URI, and finally return it from getInitialProps
if you are using NEXT JS.
Whatever the extract URI from imageurl
can me added to the meta og:image
tag.
Source: stackoverflow.com
Related Query
- How to share Image-Url to Facebook, twitter and Instagram in React JS
- how to upload image in the firebase storage and get uploaded image url in react using swr-firestore
- How to set image width to be 100% and height to be auto in react native?
- How to create a preview (Image and description) to the Url when shared link on Social media,Gmail and Skype using React JS?
- how to share environment variables between react app and express js server hosting it as static site
- React Router V4: How to render a modal in the same screen changing only the url and then with that url, be able to rebuild the whole screen
- How to pass image url as prop in React
- how to change image src using props with styled component and react
- How to get image height and width from uri on React Native?
- How to implement share to twitter with react js
- React Native - How to Build an Image Grid like FaceBook
- How to make Node and React app to share classes
- How to share a dynamically generated image from react with react-share?
- How to Fetch and Display an Image from an express backend server to a React js frontend?
- React : how to load image outside src and public folders
- How to load image and convert to blob in react
- How do I loop an image carousel with React setState and setInterval?
- How to upload an image to google drive using gapi and react
- How to Read image data from API and render in React Component
- How to share the root URL according to the auth status using reactjs, redux and redux-simple-router?
- How to upload image to aws s3 using react and django rest framework
- How to Upload Image to Firebase Storage and Upload URL to Firestore simultaneously in React.js?
- How to read an image from the localhost url and get its width and height in javascript
- Django Rest Framework and React Front End: How to prevent unauthorized users from viewing private images if they get a hold of the image URL?
- how to convert a base64 string in to normal image and show it in a web page in react js
- REACT - How to replace URL strings to <a> elements and rendering it properly
- How to set both linear-gradient and background image in a specific div using styles in React
- How to change image and background color every x seconds. React
- How do I generate dynamic meta description and image in React using React Helmet?
- How can I pass Apollo data and React Router 4 url params to my components
More Query from same tag
- react-transition-group not work until reload the page
- I am troubling integrating react-Dropzone-Uploader
- Can't display Base64 image in ReactJS from Spring Boot?
- React component with state triggers animation in subcomponent when the state of parent component is changed
- Adding delay for antd custom validator rule
- React setState not working using event property
- Reactjs how to add variable in URL parameter
- How do I get my Logo to show in my Navbar?
- How to properly enumerate object elements in a state array?
- React/react hooks: child component is not re-rendering after the state is changed?
- useSelector from 'react-redux' is undefined when running application
- Connected property is updated only once, its not updating for second time
- When showing two modal at a time with react-bootstrap in reactjs, how to show gray area above the first modal and below the second modal?
- React not rendering the Component after successful redirect
- Passing down router params to deep nested components
- Redux combineReducers() isn't recognising state
- Efficient way to pass all valid props to child?
- Reusing types for functions in React + TypeScript
- setState when receive props from parent component which fetch async data
- How to prevent an infinite loop in react using Hooks
- Same id for every object created by react-from
- I’m trying to make a digital "receipt" using the props that are in a class and using a counter that tells me the quantity, multiply it by the price,
- How to validate props that are passed to a component by value?
- React parsing Unexpected token
- setState callback not working as expected
- React and React-Dom versions should match?
- How to center out table on a Material UI Paper element
- Recharts PolarGrid polygons not showing
- 400 bad request in post request from client side
- Mobx - React: Inject and Observe together