2016-08-30 4 views
0

vimeo android api를 통합하고 내 Android app을 사용하여 vimeo에 비디오를 업로드했습니다. 성공적으로 업로드 메시지를 받았지만 비디오의 uri 비디오를 가져와야합니다. 어떻게 할 수 있습니까? 나는 그것을 얻는다?vimeo 비디오 업로드 중이지만 Android에서 비디오 링크를 가져 오지 못함

+2

, 당신은 당신의 완료에 DELETE를 실행해야 uri 비디오 uri를 얻기 위해서. https://developer.vimeo.com/api/upload/videos#complete-the-upload 지금까지 작성한 코드를 게시 할 수 있습니까? –

+1

Thanks Kevin, 지금 DELETE 요청을 시도했지만 응답으로 401 오류가 발생합니다. 제발 나를 도울 수 있어요. –

+0

코드가 보이지 않으면 문제가 무엇인지 판단 할 수 없습니다. 코드를 게시하십시오. –

답변

-1

링크 : 문서에서 api.vimeo.com/users/23550690/tickets/29acf0c117debaf7a944b310a5d7aebe video_file_id = 587,909,747 & 업그레이드 = 사실 & 서명 = 9b1ffcc48c88dd7a4b5bd0f9ab2794b2

URL urls = new URL(url); 
       connection = (HttpURLConnection) urls.openConnection(); 

       connection.setDoOutput(true); 
       connection.setRequestProperty(
         "Content-Type", "application/x-www-form-urlencoded"); 
       connection.setRequestMethod("DELETE"); 


       int responseCode = connection.getResponseCode(); 

       AppLog.e("Delete","===responseCode==="+responseCode); 
       if (responseCode != 401) { 
        InputStream inputStream = connection.getInputStream(); 
        if (inputStream != null) { 
         BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); 

         String jsons = bufferedReader.readLine(); 

         return new Object[]{jsons, requestCode}; 
        } 
       } 
관련 문제