我想获得用户的收藏,但我得到了FileNotFound异常。 这就是我正在做的事情:
URL mUrl = new URL(http://gdata.youtube.com/feeds/api/users/default/favorites?v=2 );
URLConnection conn = mUrl.openConnection();
conn.addRequestProperty("Authorization", "GoogleLogin auth=" + pToken);
conn.addRequestProperty("X-GData-Key", "key=" + pKey);
conn.connect();
InputStream is = conn.getInputStream();
int ch;
StringBuffer sb = new StringBuffer();
while( ( ch = is.read() ) != -1 ) {
sb.append( (char)ch );
}
apiResponse = sb.toString();
你知道可能出现什么问题吗?
感谢。