S
S
Sergey2016-10-12 21:11:37
PHP
Sergey, 2016-10-12 21:11:37

What is the best way to monitor likes on user photos?

There are many users on the site, where each has several links to Vkontakte and Instagram photos stored in the database.
There is a task to display the number of likes under each such link.
So far I see the solution only for the crown every 10 minutes to parse each link, but I think that VK and Inst will simply block, from a large number of requests, and my server will probably fall))
Is there a way to solve this problem differently? Maybe there are some possibilities, such as the callback function of the events on the social network itself, which will already send a request to my server when the photo was directly liked.
Likes counting should happen on the server side - so counting by clients is not suitable.
I would be grateful for any hint)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2016-10-12
@xmoonlight

1. Parse via ajax from the user interface when viewing photos.
2. The frequency of the need for parsing - control on the server side.

V
Vladimir, 2016-10-12
@Casufi

I don’t understand why count likes on the back if you can request from the API?
https://www.instagram.com/developer/endpoints/medi...
There, by the way, there are rates https://www.instagram.com/developer/limits/

K
Kirill Zhilyaev, 2016-10-13
@kirill_782

AJAX - but here it is necessary to parse everything. Either parse without a token (so that there are no 9 errors), or parse 25 at once (through execute, but with a token). 1 request - 25 responses. But you have to be prepared, because captcha can occur even in harmless situations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question