Answer the question
In order to leave comments, you need to log in
How to add a social media service to a blog?
The task is this: there are blog articles in the 'blog' section ( site.com/blog) that are displayed in fronted on the local server. How to make social media buttons visible at the end of each article? On the example of this service: https://ulogin.ru
It is not entirely clear where exactly you need to insert this top script:
<script src="//ulogin.ru/js/ulogin.js"></script>
<div id="uLogin" data-ulogin="display=panel;theme=classic;fields=first_name,last_name;providers=vkontakte,odnoklassniki,mailru,facebook;hidden=other;redirect_uri=http%3A%2F%2Fsite.com;mobilebuttons=0;"></div>
$s = file_get_contents('http://ulogin.ru/token.php?token=' . $_POST['token'] . '&host=' . $_SERVER['HTTP_HOST']);
$user = json_decode($s, true);
//$user['network'] - соц. сеть, через которую авторизовался пользователь
//$user['identity'] - уникальная строка определяющая конкретного пользователя соц. сети
//$user['first_name'] - имя пользователя
//$user['last_name'] - фамилия пользователя
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question