나는 Restfb을 (를)하고 비슷한 케이스에서 작업하고 있습니다. 나는 그것은 당신이 응답을 반환합니다
JsonObject obj= facebookClient.fetchObject(post.getId(),JsonObject.class,
Parameter.with("fields",
"reactions.type(LOVE).limit(0).summary(total_count).as(reactions_love),"+
"reactions.type(WOW).limit(0).summary(total_count).as(reactions_wow),"+
"reactions.type(HAHA).limit(0).summary(total_count).as(reactions_haha),"+
"reactions.type(LIKE).limit(0).summary(total_count).as(reactions_like),"+
"reactions.type(ANGRY).limit(0).summary(total_count).as(reactions_angry),"+
"reactions.type(SAD).limit(0).summary(total_count).as(reactions_sad)"));
(이 사람 here 신용)이 발견했습니다 (이 예에서는 포스트에 아무런 반응이 없었다). 당신의 페이스 북의 클라이언트는 당신이 오며 'Post 유형을 확장 할 경우이 도움이 :)
{"reactions_haha":{"summary":{"total_count":0},"data":[]},"reactions_angry":{"summary":{"total_count":0},"data":[]},"reactions_sad":{"summary":{"total_count":0},"data":[]},"reactions_like":{"summary":{"total_count":0},"data":[]},"id":"id_of_post","reactions_love":{"summary":{"total_count":0},"data":[]},"reactions_wow":{"summary":{"total_count":0},"data":[]}}
그래프 API 희망의 V2.6을 사용하여 자바 유형을 사용하여 reactions_wow' 등'을위한 필드를 추가하도록 구성해야 '반응 '을 선택하면 RestFB 기능을 사용하고이 값에 액세스 할 수 있습니다. 'JsonObject'는 괜찮지 만,'total_count' 값에 접근하는 것은 아름답 지 않습니다 :) – Norbert