您無法使用此邊緣讀取內容。
如要透過私人訊息作出回覆:
POST /v19.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
代表的節點。
欄位 | 描述 | 類型 |
---|---|---|
編號 | 新建立的訊息編號。 |
|
您無法使用此邊緣刪除內容。
您無法使用此邊緣作出更新。