Likes for this object
이름 | 설명 |
---|---|
페이지 전체 공개 콘텐츠 액세스 | 이 기능 권한이 필요할 수도 있습니다. |
GET /v21.0/{page-post-id}/likes 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(
'/{page-post-id}/likes',
'{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(
"/{page-post-id}/likes",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{page-post-id}/likes",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{page-post-id}/likes"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
이 에지로부터 읽는 경우 JSON 형식의 결과를 반환합니다:
{ "
data
": [], "paging
": {}, "summary
": {} }
data
paging
summary
수치 등 에지에 관해 집계된 정보입니다. 요약 매개변수에 가져오려면 해당 필드를 지정하세요(예: summary=total_count
).
필드 | 설명 |
---|---|
total_count unsigned int32 | Total number of likes |
can_like bool | Can the viewer like |
has_liked bool | Has the viewer liked |
오류 | 설명 |
---|---|
100 | Invalid parameter |
190 | Invalid OAuth 2.0 Access Token |
104 | Incorrect signature |
200 | Permissions error |
80001 | There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |