i followed the youtube data api to rate the video from the app. But i got "not found 404 error."
https://www.googleapis.com/youtube/v3/videos/rate?id=Z98hXV9GmzY&rating=like&access_token="+token+"&key=XXXXX
what is the right way to do that... Any help is appreciated. Thankyou
I'm using codename one platform for the app by the way..
Login gc = GoogleConnect.getInstance();
gc.setCallback(new LoginCallback() {
@Override
public void loginFailed(String errorMessage) {
Dialog.show("Error Logging In", "There was an error logging in: " + errorMessage, "OK", null);
}
@Override
public void loginSuccessful() {
Dialog.show("Logged In", "you are currently logged in ", "OK", null);
}
});
if (!gc.isUserLoggedIn()) {
gc.doLogin();
} else {
token = gc.getAccessToken().getToken();
}
});
findLikes(f).addActionListener((e) -> {
ConnectionRequest cr = new ConnectionRequest() {
@Override
protected void readResponse(InputStream input) throws IOException {
super.readResponse(input);
}
@Override
protected void postResponse() {
super.postResponse();
}
};
cr.setPost(false);
cr.setUrl("https://www.googleapis.com/youtube/v3/videos/rate?id=" + videoId + "&rating=like&access_token="+token+"&key=XXXXX"); //this doesnt give anything... is it not the right way??
cr.setDuplicateSupported(true);
NetworkManager.getInstance().addToQueueAndWait(cr);
});