Ich versuche, eine Anfrage zu stellen share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid und click_count von meinem node.js Server mit dem neuen facebook api v2.7.facebook API v2.7 in node.js wie man Kommentare und Likes erhalten
was ich bis jetzt herauskam ist: var likesCount = 0; var KommentarZahl = 0; var shareCount = 0; rp (graphApiReq, {json: true}) .then (res => { commentCount = res.share.comment_count; shareCount = res.share.share_count; lassen graph_id = res.og_object.id; lassen likesApiReq = https://graph.facebook.com/v2.7/${graph_id}/likes?summary=true&access_token=${appId}|${appSecret}
; rp (likesApiReq, {json: true}) .then (likesRes => { likesCount = likesRes.summary.total_count; }) response.send ({likesCount, commentCount, shareCount}); })
also im Grunde habe ich hier 2 Anrufe: 1. um den com zu holen Mit dieser Anfrage zählen die auf unheimliche Weise immer 0 und die Anzahl der Anteile, die tatsächlich funktionieren, https://graph.facebook.com/v2.7/?id=${url}/&access_token=${appId}|${appSecret}
;
- die Gleichen erhalten zählen, die in eine seltsame Art und Weise auch immer 0 ist, ich kommen aus dem ersten Anruf, einen weiteren Anruf mit dem Graph-ID Vorform hatte
https://graph.facebook.com/v2.7/${graph_id}/likes?summary=true&access_token=${appId}|${appSecret}
irgendwelche ideen? Brauche ich wirklich diese 2 anrufe? Warum sind die Ergebnisse immer 0?
danke!
https://developers.facebook.com/docs/graph-api/using-graph-api/#fields – CBroe