Okay but first, can you explain how you want the ranking to be in words? How do you mean activity based?
Do you mean posts with more engagement should rank higer?
Do you mean users more active should rank higher?
Do you want posts to be ranked based on the current user's past activity? (Machine Learning Algorithm)
There could be more... it depends on how exactly u want it to work. So please can you explain better so we can assist better
Thank you for replying. I appreciate this a lot.
I want any post that got any recent engagement (not number, but how recent) to rise to the top.
>>> Example of Recent Activity Based Ranking Algorithm.
Post A gets published at 11:15am
Post B gets published at 11:16am
Post C gets published at 11:17am
In the absence of any engagement (likes and comments) occurring between 11:18am till 11:20am, the page when refreshed looks like this.
#1 Rank - Post C (since it got published recently)
#2 Rank - Post B
#3 Rank - Post A
NOTE: List of actions counted as an activity "Publishing, comments, likes, shares". So, how recent an activity is, is the most important ranking factor for the post that recieved the activity.
>>> Further Implementation of the Algorithm Illustrating the Note Above
Post B gets a like at 11:22am
Post C gets a share at 11:20am
Post D gets published at 11:21am
Post A gets a comment at 11:19am
The ranking will look as follows based on recent activity (See note above)
#1 - Post B
#2 - Post D
#3 - Post C
#4 - Post A