我正在尝试使用 php-sdk 发布照片 - 一切都成功地工作了几个月,但突然之间没有骰子。
其他功能仍在使用相同的代码库(即:将消息发布到墙上) - 它只是发布在我身边坏掉的照片。
try {
$data = $facebook->api('/me/photos', 'post', $args);
} catch (FacebookApiException $e) {
print_r($e);}
正在倾倒:
FacebookApiException Object ([result:protected] => Array ([error_code] => 3 [error] => Array ([message] => 没有设置 URL![type] => CurlException)) [message:protected] => 否URL 设置![string:private] => [code:protected] => 3 [file:protected] => /locationofmy/base_facebook.php [line:protected] => 818 [trace:private] => Array ([0 ] => 数组 [.......]
从 FB php-sdk 第 818 行:
if ($result === false) {
$e = new FacebookApiException(array(
'error_code' => curl_errno($ch),
'error' => array(
'message' => curl_error($ch),
'type' => 'CurlException',
),
));
curl_close($ch);
throw $e;
}
curl_close($ch);
return $result;
}
这已经工作了很长时间 - Facebook 方面有什么变化吗?
编辑:php-sdk 版本:3.1.1
编辑2:
$tag = array(
'tag_uid' => 'acct_num',
'x' => 0,
'y' => 0
);
$tags[] = $tag;
$args = array(
'message' => $item_description,
'image' => '@' . realpath($temp_path . $tempFile),
'tags' => $tags,
);