现在我可以解决这个问题了.. 打开并修改文件 facebookapi_php5_restlib.php 并像这样
public function post_request($method, $params, $server_addr) {
list($get, $post) = $this->finalize_params($method, $params);
$post_string = $this->create_url_string($post);
$get_string = $this->create_url_string($get);
$url_with_get = $server_addr . '?' . $get_string;
if ($this->use_curl_if_available && function_exists('curl_init'))
{
$useragent = 'Facebook API PHP5 Client 1.1 (curl) ' . phpversion();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url_with_get);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3600);
curl_setopt($ch, CURLOPT_TIMEOUT, 3600);
$result = $this->curl_exec($ch);
curl_close($ch);
} else {
$content_type = 'application/x-www-form-urlencoded';
$content = $post_string;
$result = $this->run_http_post_transaction($content_type,$content, $url_with_get);
}
return $result;
}
更改超时时间