我正在通过 PHP cURL 向 Facebook 发布如下消息:
Hello world
This is a test
#hash
Facebook 墙上的条目缺少换行符 - 文本如下所示:
Hello world This is a test #hash
这是我的代码:
$attachment = array(
'access_token' => $token,
'message' => $postMessage
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://graph.facebook.com/'.$profileID.'/feed');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
如何使换行符发送到?
PS对不起我的英语