I
I
Ivan Lukyanov2017-03-28 10:15:58
In contact with
Ivan Lukyanov, 2017-03-28 10:15:58

Is there a vKontakte randomizer among the reposts of the entire feed (a range of posts)?

Good time!
Is there some kind of "selector" or "randomizer" that can choose among those who made a repost not one post, but all posts that fall within a certain date range?
Situation: selfies are published on the wall of the group in separate posts, and a contest is held - you need to randomly select 3 members of this group who found themselves in the photo in one of the posts, reposted it to their wall and fixed it at the top of their feed. We do not know the post in advance, we only know the period during which a hundred or a thousand such posts will be made.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2017-03-28
@sergiks

The task is not typical, so it is unlikely that such a scenario is provided for in the services. At the same time, it is not difficult to implement such a choice using the VKontakte API:

  1. get a list of records and filter, leaving only those in the period
  2. find reposts
  3. check each, leaving only the pinned ones (field is_pinned )
  4. highlight their authors
  5. weed out non-group members groups.isMember()
  6. pick three of them randomly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question