您無法使用這個關係連線讀取。
使用私人訊息回覆:
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
狀態的粉絲專頁僅能傳送訊息給在該粉絲專頁上擁有角色的人。
參數 | 說明 | Type |
---|---|---|
| 回覆中的粉絲專頁留言或訪客貼文編號。 |
|
| 回覆的文字。這是必要欄位。 |
|
成功時,您會收到具有以下欄位的回應。此外,此端點支援寫入後讀取功能,可立即讀取回傳類型中 id
代表的節點。
欄位 | 說明 | 類型 |
---|---|---|
id | 新建訊息的編號。 |
|
您無法使用這個關係連線刪除。
您無法使用這個關係連線更新。