2012-11-21 12 views
7

Wie kann ich Kommentare für ein Video in Version 3 der YouTube-API abrufen? Ich habe versucht youtube.activities.list und youtube.videos.list und die meisten anderen Methoden im Google API Explorer. Fehle ich hier etwas?Wie hole ich Kommentare in Version 3 der YouTube API?

(youtube.activities.list scheint den richtigen Anruf zu sein, aber das gibt nur meine eigenen Uploads und Playlist-Elemente.)

Antwort

7

Update: Kommentar-Funktion in Data API v3 ist jetzt verfügbar. http://youtube-eng.blogspot.com/2015/04/manage-comments-with-youtube-data-api-v3.html

Es gibt keine Unterstützung für Videokommentare in v3 der Daten-API. Wenn Sie Kommentare abrufen oder hinzufügen müssen, müssen Sie v2 der Daten-API verwenden.

+4

Gibt es die ETA auf wann Kommentare durch den v3 API Abrufen verfügbar sein? –

+0

Gibt es nicht, nein. –

+0

Hallo @Jeff, gibt es einen Kommentar Endpunkt in einer der API für Live-Video-Streams? Eine Möglichkeit, Kommentare zu diesen Live-Stream-Kommentaren zu erhalten und zu veröffentlichen? – KRB

1
https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&maxResults=20&videoId=Au87oAJ2jeE&key=app-key 

Ergebnis json

{ 
"kind": "youtube#commentThreadListResponse", 
"etag": "\"mPrpS7Nrk6Ggi_P7VJ8-KsEOiIw/Q8IErPBy5AB6a2BKgaDaOWcf_jQ\"", 
"pageInfo": { 
    "totalResults": 10, 
    "resultsPerPage": 20 
}, 
"items": [ 
    { 
    "kind": "youtube#commentThread", 
    "etag": "\"mPrpS7Nrk6Ggi_P7VJ8-KsEOiIw/bdn5c_ALv5vbJlPCzNuP1B9UqiU\"", 
    "id": "z12qxfxr2onpy1b5l04cdfzrgwabir0q4bo", 
    "snippet": { 
    "channelId": "UCJr72fY4cTaNZv7WPbvjaSw", 
    "videoId": "Au87oAJ2jeE", 
    "topLevelComment": { 
    "kind": "youtube#comment", 
    "etag": "\"mPrpS7Nrk6Ggi_P7VJ8-KsEOiIw/JZObCX09D4_6WRoUvqcZuSWtjRw\"", 
    "id": "z12qxfxr2onpy1b5l04cdfzrgwabir0q4bo", 
    "snippet": { 
     "channelId": "UCJr72fY4cTaNZv7WPbvjaSw", 
     "videoId": "Au87oAJ2jeE", 
     "textDisplay": "Thank you Dan and Envato for creating this video!\ufeff", 
     "authorDisplayName": "Randy Taschner", 
     "authorProfileImageUrl": "https://lh6.googleusercontent.com/--vE0X3_vDCs/AAAAAAAAAAI/AAAAAAAAAJU/aBCbmKPAMtc/photo.jpg?sz=50", 
     "authorChannelUrl": "http://www.youtube.com/channel/UCTRuBHRb4BRFcob-hMj6NnQ", 
     "authorChannelId": { 
     "value": "UCTRuBHRb4BRFcob-hMj6NnQ" 
     }, 
     "authorGoogleplusProfileUrl": "https://plus.google.com/109363234563168058777", 
     "canRate": false, 
     "viewerRating": "none", 
     "likeCount": 1, 
     "publishedAt": "2015-08-16T05:02:25.807Z", 
     "updatedAt": "2015-08-16T05:02:25.807Z" 
    } 
    }, 
    "canReply": false, 
    "totalReplyCount": 0, 
    "isPublic": true 
    } 
    } 
} 
Verwandte Themen