开发者

Facebook API so slow

开发者 https://www.devze.com 2023-04-05 05:56 出处:网络
I\'m using the PHP SDK and it\'s really slow, for example to run this: try { $me = $this->facebook->api(\'/me\');

I'm using the PHP SDK and it's really slow, for example to run this:

      try {
        $me = $this->facebook->api('/me');
        if ($me) {
   开发者_如何学Python       return true;
        }
      } catch (FacebookApiException $e) {
        return false;
      }

I bench marked it at 0.8605. This adds up to a lot, is there a better way to query this data?


You can cache the response and then subscribe to real-time updates to get notified if that data ever changes. You could also load it asynchronously through javascript in the browser. I haven't seen that slow of a response time from /me though so it could be a temporary issue. Are you sure its not network response time? What country are you requesting it from?

0

精彩评论

暂无评论...
验证码 换一张
取 消