Facebook / Twitter โ€œLikeโ€ buttons in pure html

I am trying to add generic buttons to my simple site ...

  • Is it possible to make a Facebook โ€œlikeโ€ button in pure html?

  • Is it possible to make the twitter button as โ€œcleanโ€?

+4
source share
2 answers

From the documentation for Facebook developers, paste the following into the markup body:

<iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe> 

(Make sure you close the iframe tag, it is left open on the facebook website.)

And for twitter (found on forum ):

 <a href="https://twitter.com/home?status=Enter status message here" title="Click to send this page to Twitter!" target="_blank">Tweet This!</a> 
+8
source

The Tweet button is the recommended method for twitter, although a simple link like this also works if you want to share the link:

Similarly, http://www.facebook.com/sharer.php?u= allows you to share URLs.

There are probably more ways to share without using JavaScript (I remember some function that pre-sets the tweet text on the Twitter homepage but cannot find it right now).

+5
source

Source: https://habr.com/ru/post/1337227/


All Articles