开发者

Facebook API so slow

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜