jaypabs
jaypabs

Reputation: 1567

How to Change Facebook Share Button to Image?

Using an HTML5 code of Facebook share, this gives us the following code:

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-type="button_count"></div>

Is there a way to change the image that I like?

I also tried the link option but there's still seems no way to add a custom image:

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-type="link"></div>

Upvotes: 4

Views: 8664

Answers (2)

Rakesh
Rakesh

Reputation: 1

Nice... Everything working fine but you just need to do dynamic your slug or image name which you want to share in url.

Upvotes: -2

aks.
aks.

Reputation: 386

Click the share button, copy the address bar, and then paste that into the URL section below.

<a target="_blank" href="javascript:window.open('URL','title','width=500,height=300')">
<img src="img.jpg">
</a>

Now you can put anything between to the tags and clicking it will open to share.

Upvotes: 4

Related Questions