对不起,我回复了错误的帐户!
的代码是这样的:
<?php
include("config.php");
post("Test",$at);
$id = "550773858289457";
$url = "https://graph.facebook.com/$id/messages?access_token=$at";
$ch = curl_init();
$attachment = array('message' => 'description here'
);
curl_setopt($ch, CURLOPT_URL,$url);
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);
$result= curl_exec($ch);
curl_close ($ch);
?>
它replyes:
{"id":"302300649895651_312334605558922"}{"error":{"message":"Unsupported post request.","type":"GraphMethodException","code":100}}
三江源!
请张贴您的php代码 – chriz 2013-03-22 11:55:36
您是否使用页面访问令牌? – CBroe 2013-03-22 13:14:52
我有同样的问题,消息被创建,我可以得到的uuid返回时,当我提交它,但是当我使用uuid来查找msg的“消息”字段是空的,就像我的消息已经剥离出来它。即使将应用程序设置为我的应用程序,我也可以成功地从Graph API进行回复,但我无法直接从应用程序获取此应用程序。 – 2016-03-07 12:36:42