Quick installation of the Facebook Like button

(No ratings yet)
Загрузка ... Loading ...

Many social networks are expanding their boundaries by providing users and webmasters free services.

Various forms of registration, banners, business cards and buttons to "share", "I like" a real breakthrough in the dissemination of information to users.

And when you use them experienced webmaster can benefit for your own resource. Moreover, this is true.

Быстрая установка кнопки Like от Facebook

In this article I will discuss how to easily add Knop «Like» («Like" - a Russian version of Facebook) to your resource.

Button «Like» useful for the rapid dissemination of information. In addition to being one click solves the problem of the census of the news, so it still will see buddylist in the news - the potential users of the resource, confident in the reliability of the source.

Now, in order to add the button «Like» the resource

Go to your Facebook account and look for the form in the Developers .

Как добавить кнопку Facebook на сайт

  1. Do not need to fill in a field URL to like - it was created in order that automatically populated when you click on the button that is installed on your page.
  2. LayoutStyle - allows you to display the counter likes and accordingly choose the style of the button.
  3. ShowFaces - toggles anonymous click on the ability to display photos of users who click the button «Like».
  4. Parameter Width - sets the width of the button, in pixels.
  5. Verb to display - displays the text in the buttons that are in the Russian language version reads like a "Like" and "Recommend» (Like »and« Recommend »).
  6. In introducing the parameter string Font font that is displayed on the button.
  7. Color Scheme allows you to choose the most suitable design that makes button dark or light. Many users prefer the light version.

Once you have filled in all the parameters of the plugin, click "Get Code» («Get code»).

Получить код кнопка Facebook

We have before us the following screen appears.

And so the code looks like the button «Like» (in ifame and XFBML).

Как добавить кнопку Мне нравится на сайт

Accordingly, the little window at the top we see the iframe-code, and the bottom - XFBML.

If you want to insert code in the blog engine to WordPress , then you need to edit the iframe in a row

  http% 3A% 2F% 2Fexample.com% 2Fpage% 2Fto% 2Flike 

replacing it with the

  ?> <? Php the_permalink ()?> 

For example, in my blog button "Like" edited as follows:

  "no" frameborder = "0" style = "border:none; overflow:hidden; width:420px; height:35px;" allowTransparency = "true" src = "http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?> &layout=standard&show_faces=false&width=420&action=like&colorscheme=light&height=35"></iframe> <Iframe scrolling = "no" frameborder = "0" style = "border: none; overflow: hidden; width: 420px; height: 35px;" allowTransparency = "true" src = "http://www.facebook.com/ plugins / like.php? href = <? php the_permalink ()?> & layout = standard & show_faces = false & width = 420 & action = like & colorscheme = light & height = 35 "> </ iframe> 

Asynchronous loading button «Like» (in HTML)

To place «Like» on the site, made in HTML, follow these steps. This is necessary in order not to hinder download site. There is nothing complicated and button «Like» in an asynchronous loading will look exactly the same.

We put in the html-code of such a container (at the location of the button «Like»):

  "fb-root" >< / div > <Div id = "fb-root"> </ div> 

At the end of html-document insert this code:

  "http://connect.facebook.net/ru_RU/all.js#appId=126659647433111&amp;xfbml=1" ></ script >< fb : like href = "<?php the_permalink() ?>" send = "false" width = "420" show_faces = "false" font = "" ></ fb : like > <Script src = "http://connect.facebook.net/ru_RU/all.js # appId = 126659647433111 & xfbml = 1"> </ script> <fb: like href = "<? Php the_permalink ()?>" send = "false" width = "420" show_faces = "false" font = ""> </ fb: like> 

Note that in this case you can specify the language of a button, which uses the default. Thank you for your attention and a good use of the service on Facebook!

Last modified: 10/08/2013 at 08:12
Published: Wednesday, June 15, 2011 at 16:43
Choose the language:

Have something to say? Do not be silent!


Your comment will appear after being moderated.
Spam and off-topic posts are deleted.

To insert php-code, use the tag:
<pre lang="php"> php-code </ pre>


I'm not a spammer!