custom share image for fb, g+ and twitter using op

2019-08-22 17:08发布

问题:

Is it possible to have a custom share image for Facebook, Google+ and Twitter?

I've already set up the open graph tags in the head of the document.

Thanks

UPDATE:

For Facebook:

<a href="http://www.facebook.com/share.php?u=url" target="_blank" ><img src="fb-img"/></a>

For Twitter:

<a href="http://twitter.com/home?status=<my-status>" target="_blank"><img src="twitter-img" /></a>

Still looking for google+

By the way, any difference with sharer.php v/s share.php for Facebook?

回答1:

I found the best solution to implement custom share button with Facebutton: Go to facebook developers page and there you will have to read the following article which will explain you how to use meta tags (HTML) on the head of your page: https://developers.facebook.com/docs/sharing/webmasters

Basically you need to add a Share Button on your page, right?. So, what you need to do is first of all, add the meta tags that page ask you for on the head of your page. Then everything is so easy. After facebook provides you with the code for the share button, now when you click on it, it will show you the image you specified on your meta tags. Take a look at that page and you'll see how easy is to implement it.

Twitter still i haven't implement it yet neither for google :(