您无法使用此连线读取。
若要以私信形式回复:
POST /v20.0/{object-id}/private_replies HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->post(
'/{object-id}/private_replies',
array (),
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/{object-id}/private_replies",
"POST",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{object-id}/private_replies",
null,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{object-id}/private_replies"
parameters:params
HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
可在用户帖子或评论创建之日起 7 天内对帖子或评论进行私信回复。
此连线需要包含下列权限的主页访问口令:
pages_messaging
系统将处于开发模式的应用限制为只能向在该应用中具有身份的用户发送消息。此外,系统只允许处于 unpublished
状态的公共主页向在该主页上具有身份的用户发送消息。
参数 | 说明 | 类型 |
---|---|---|
| 您正在回复的主页评论或访客帖子之编号。 |
|
| 回复文本。此为必填字段。 |
|
如果成功,您会收到包含以下字段的响应。此外,此端点支持先写入后读取,并可即时读取返回类型中由 id
表示的节点。
字段 | 说明 | 类型 |
---|---|---|
编号 | 新创建的消息编号。 |
|
您无法使用此连线进行删除。
您无法使用此连线更新评论。