2013-10-22 30 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中允许的域,并打开该服务器页面以处理集成。

相关问题