I wanted to display the share count of the articles on my blog (wordpress) to the readers. So I decided to call the api directly:
$fb_call = "https://graph.facebook.com/fql?q=SELECT%20share_count,%20total_count%20FROM%20link_stat%20WHERE%20url='".$url."'" ;
$response = wp_remote_request ( $fb_call ) ;
This worked fine , when I test it myself. But at times, there are 100's of readers trying to access different posts at the same time, which results in an error - application request limit reached. The current limit seems to be 600 calls per 600 seconds, per token & per IP. It could be happening because the graph api is treating all these requests as if coming from the same user. So i need to add in an access token in the call. How do I generate the token without any login details server side, as the articles are shared using client side scripts, which I am not supposed to change. PHP SDK has a generate function, but I believe the user has to be logged in using that as well. Thanks for the help, and I apologize if the question is mundane/not organized.