2013-10-22 39 views
1

我已經添加了Dropbox的選擇器,以我的應用程序,像這樣:與Dropbox的選擇器和PhoneGap的應用程序無效起源

<script type="text/javascript" src="js/dropins.js" id="dropboxjs" data-app-key="my app key is here"></script> 

$('#dropbox-choose').on('touchend', function(){ 
    Dropbox.choose({ 
     success: function(file){ 
      console.log("Here's the file link:" + file[0].link) 
     }, 
     cancel: function() { 

     }, 
     linkType: "direct", 
     multiselect: false, 
     extensions: ['.pdf', '.doc', '.docx' , '.txt' , '.rtf' ,'.wps' , '.odt'] 
    }); 
}) 

它去加載選擇器,但我得到一個「錯誤」:「無效的起源'每次

有什麼想法?

回答

0

您的應用在本地運行,因此存在安全問題。我建議您在自己的服務器上託管此集成,將該服務器添加到Dropbox中允許的域,並打開該服務器頁面以處理集成。

相關問題