iOS上的DropBox应用程序是否具有URL方案? [英] Does the DropBox app on iOS have a URL scheme?

查看:85
本文介绍了iOS上的DropBox应用程序是否具有URL方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在我的应用程序中启动DropBox应用程序.因此,我想知道DropBox应用程序是否具有可用于调用openURL的URL方案,类似这样,除了我不知道该字符串应该是什么.

I would like to be able to launch the DropBox app within my app. Therefore I would like to know if the DropBox app has a URL scheme that I can use to call openURL, something like this, except I don't know what this string should be.

NSURL *myURL = [NSURL URLWithString:@"dropbox://"];
[[UIApplication sharedApplication] openURL:myURL];

推荐答案

Dropbox url方案唯一可以做的就是将Dropbox App连接到它. 像这样:

The only thing you can do with the Dropbox url-scheme is connect your Dropbox App to it. Like this:

var key = "[YOUR API KEY]";
var secret = "[YOUR API SECRET]";
var apiversion = "1";

window.open("dbapi-1://"+apiversion+"/connect?k="+key+"&s="+secret);

通常,dropbox-app会通过以下方案打开iOS应用来进行响应:

Normally the dropbox-app responses by opening your iOS app with the following scheme:

db-[YOU API KEY]://connect?oauth_token=SOMETOKEN&oauth_token_secret=SOMEOATHTOKEN&uid=SOMETHING

或带有:

db-[YOU API KEY]://cancel

通过查看适用于iOS的Dropbox SDK来解决此问题.

Got this from looking at the Dropbox SDK for iOS.

这篇关于iOS上的DropBox应用程序是否具有URL方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆