Best Way to get facebook share count and update using wp_schedule_event or any other method

I’ve actually made a plugin called Social Metrics Tracker which does exactly what you are trying to achieve. Please also feel free to read the source code on GitHub.

To answer your questions:

You are right that running an hourly cron task to update all of the posts would cause a problem with even just 200 articles because the server would make one GET request for each post every hour to the Facebook API.

Here is what I learned and what I did for my implementation:

1. Only run the update task if there is actually traffic to a post.

There is no reason to update stats for an old post with no visitors. Instead of running the update check every hour for every post, in my implementation I run the update check in the head of each individual post.

2. Use a TTL to prevent frequent updates

Store and retrieve the timestamp every time that we update stats for a given post. This way, a post won’t be updated more frequently than every 3600 seconds (for example). This value is configurable since blogs with a high volume of posts will need a longer TTL.

3. Run the update in the cron

In your example above, you are already running the update in the cron (which is good). In my implementation, updates are also run in the cron to prevent additional page load time for site visitors.

Here is some example code which takes into account the three considerations above:

add_action( 'wp_head', 'checkThisPost');

public function checkThisPost() {
    global $post;
    if ($post) $post_id = $post->ID;

    $last_updated = get_post_meta($post_id, "socialcount_LAST_UPDATED", true);

    // Just an example of how this works:
    if ($last_updated > time()-3600) {
        wp_schedule_single_event( time(), 'social_metrics_update_single_post', array( $post_id ) );
    }

}

function social_metrics_update_single_post($post_id) {
    // Run the update!
}