2

I'm trying to get Youtube playlist and show it in a listview I'm using this tutorial , it's working fine with me for getting videos from USERNAME but when I try to get videos informations from Playlist link it shows the following error :

Thread-968| Feck
org.json.JSONException: No value for player
org.json.JSONObject.get(JSONObject.java:354)
org.json.JSONObject.getJSONObject(JSONObject.java:569)
com.blundell.tut.service.task.GetYouTubeUserVideosTask.run(GetYouTubeUserVideosTask.java:90)
java.lang.Thread.run(Thread.java:856)


line 90 in GetYouTubeUserVideos is:
       url=jsonObject.getJSONObject("player").getString("default");

and I've changed

String title = jsonObject.getString("title");

to

String title = jsonObject.getJSONObject("video").getString("title");

and I'm using the following link for playlist :

"https://gdata.youtube.com/feeds/api/playlists/" + username + "?&v=2&alt=jsonc"

4

1 に答える 1