gpt4 book ai didi

java - 回复 : Youtube rating

转载 作者:行者123 更新时间:2023-12-01 10:06:52 26 4
gpt4 key购买 nike

我正在尝试从事 YouTube 视频评级工作。但我被困在这里了。这两个 YouTube 评级请求有什么区别?

https://www.googleapis.com/youtube/v3/videos/rate?id=gEqU0FMzPFo&rating=like&key=xxxx

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.rate?
id=wtLJPvx7-ys&rating=like

我在指南中找到了一个,在谷歌开发人员的引用部分找到了另一个。我应该使用哪一个来评价视频

尽管我登录了,但第一个显示未找到错误,第二个我可以在桌面浏览器中授权和执行(它也有效),但它在我使用浏览器组件查看 youtube 视频的移动应用程序中不起作用。所以我很困惑应该使用哪一个?

更新:我按照建议使用了第一个,但它给出了 403 禁止错误

ConnectionRequest cr = new ConnectionRequest() {

@Override
protected void readResponse(InputStream input) throws IOException {
JSONParser jSONParser = new JSONParser();
results = jSONParser.parseJSON(new InputStreamReader(input));
System.out.println("results " + results);
}

@Override
protected void postResponse() {
super.postResponse();
}

};
cr.setPost(true);
cr.setUrl("https://www.googleapis.com/youtube/v3/videos/rate?id=" + "kF94Jwx9ugU" + "&rating=like&access_token="+token+"&key=AIzaSyCAETrMkZeJ_nTq4ZdP1Jq6BFtA_11TR6I");
cr.setDuplicateSupported(true);
NetworkManager.getInstance().addToQueueAndWait(cr);

最佳答案

回答您的问题:

https://www.googleapis.com/youtube/v3/videos/rate?id=gEqU0FMzPFo&rating=like&key=xxxx

这是您对视频进行评分所需的实际 API。而另一个,

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.rateid=wtLJPvx7-ys&rating=like

我确定这只是一个 API-Explorer 站点,以便您可以尝试使用 API 来查看请求的样子以及服务器的响应。

注意:当我尝试时,它也会触发以前的网址,即 https://www.googleapis.com/youtube/v3/videos/rate

关于java - 回复 : Youtube rating,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36382165/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com