2016-11-10 2 views
1

Ich versuche, die Antwort von der Graph-API auf die Gesamtzahl der Reaktionen in der JSON-Antwort zu erhalten.Facebook Reaktionen Gesamtzahl

Zum Beispiel:

{ 
    "data": { 
    "like": 1242, 
    "wow": 674, 
    "sad": 2500 
    ...... 
    } 
} 

Zur Zeit habe ich die folgende "{postID}/Reaktionen/Felder = Typ?" Aber das ist nicht die Anzahl für jede Rückkehr. Hat jemand eine Lösung für das letzte Update in der Facebook API?

https://developers.facebook.com/tools/explorer/

https://developers.facebook.com/docs/graph-api/reference/post/reactions

Antwort

1

ich es herausgefunden, aber die JSON-Antwort ist nicht das gleiche Format, aber es funktioniert für mich.

?fields=reactions.type(LIKE).summary(total_count).limit(0).as(like),reactions.type(LOVE).summary(total_count).limit(0).as(love),reactions.type(WOW).summary(total_count).limit(0).as(wow),reactions.type(HAHA).summary(total_count).limit(0).as(haha),reactions.type(SAD).summary(total_count).limit(0).as(sad),reactions.type(ANGRY).summary(total_count).limit(0).as(angry) 
Verwandte Themen