2016-08-30 74 views
0

我已經整合了vimeo android api並上傳視頻到vimeo使用我的android應用程序,每次我得到成功的上傳消息,但我需要獲得視頻uri我的視頻。我明白了 ??vimeo視頻上傳,但沒有獲取視頻鏈接在Android

+2

從文檔,您需要發出刪除您完成uri爲了得到視頻uri。 https://developer.vimeo.com/api/upload/videos#complete-the-upload 你可以請發佈你寫的代碼到目前爲止? –

+1

感謝凱文, 現在我正在嘗試刪除請求,但得到401錯誤的迴應。 你能幫我解決嗎? –

+0

沒有看到你的代碼,我不能幫助確定你的問題是什麼。請發佈您的代碼。 –

回答

-1

鏈接:api.vimeo.com/users/23550690/tickets/29acf0c117debaf7a944b310a5d7aebe video_file_id = 587909747 &升級=真&簽名= 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}; 
        } 
       }