Top 3 posts in last week ordered by Facebook and Twitter share counts

Written by  on September 3, 2016 

I am interested in displaying the top 3 stories in the past week based on the total number of shares on Facebook and Twitter. I have found that these share counts are more useful indications of what is popular in comparison to sorting by the number of comments using 'orderby' => 'comment_count'.

So my question is: What is the best way to sort posts based on the number of Facebook or Twitter shares? I’m a little concerned about the number of requests to the Facebook and Twitter APIs if I were to check the number of shares for all of the posts in the past week, and then go from there. Thanks in advance!

Category : Wordpress

Tags :