Get a performance metrics on a WhatsApp template.
Businesses, WhatsApp Businesses, and business phone numbers originating in the EU or Japan are not supported.
GET /v21.0/{whats-app-business-account-id}/template_performance_metrics HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{whats-app-business-account-id}/template_performance_metrics',
'{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(
"/{whats-app-business-account-id}/template_performance_metrics",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{whats-app-business-account-id}/template_performance_metrics",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{whats-app-business-account-id}/template_performance_metrics"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Parameter | Keterangan |
---|---|
name string | name |
template_id numeric string | template_id |
Jika membaca dari edge ini, maka akan mengembalikan hasil berformat JSON:
{ "
data
": [], "paging
": {} }
data
paging
Kesalahan | Description |
---|---|
200 | Permissions error |