I
I
Igor Samokhin2012-08-16 21:46:48
Social media
Igor Samokhin, 2012-08-16 21:46:48

How to calculate the total number of likes for an article?

Given: An article on the site has 2 likes on facebook, 3 likes on VKontakte and 5 likes on Twitter. How can you calculate the sum of all these likes for an article?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vitaliy Petrychuk, 2012-08-16
@grigor007

facebook : graph.facebook.com/http://habrahabr.ru/post/149709/

{
id: "http://habrahabr.ru/post/149709/",
shares: 3
}

twitter : urls.api.twitter.com/1/urls/count.json?url=http://habrahabr.ru/post/149709/
{
count: 29,
url: "http://habrahabr.ru/post/149709/"
}

vk : vk.com/share.php?act=count&index=1&url=http://habrahabr.ru/post/149709/
VK.Share.count(1, 9); // 9 - count

B
bobermaniac, 2012-08-16
@bobermaniac

Um… 2+3+5=10

S
Shultc, 2012-08-16
@Shultc

Are you going to check by accounts so as not to double count one person who liked in several places?

F
Freem, 2012-08-17
@Freem

Somewhere lay the script considered all together. +mail.ru and +odnoklassniki.ru… I can't find it.
Used for the contest, launched in the crown.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question