Closed Pardeep94 closed 6 years ago
If you want to use a custom image for the share button, then just add a img
or svg
. You can do something like this:
import React from 'react';
import { render } from 'react-dom';
import {
FacebookIcon,
FacebookShareButton,
} from 'react-share'
const App = () => (
<div>
<FacebookShareButton quote='Show me the Google!' url={'https://www.google.com'}>
<img src='http://via.placeholder.com/100x100?text=foo' />
</FacebookShareButton>
</div>
);
render(<App />, document.getElementById('root'));
Or if you want to customize the link preview of facebook, use open graph. Read here for further details: https://developers.facebook.com/docs/sharing/webmasters#markup & http://ogp.me/
Why not add this to the readme?
I want to add custom icon of share and I also want to edit title and description of showing on facebook