我从DropBox" ..... fquCiA_pW5SsJal2C ......."获得了一个生成的访问令牌。
我使用以下代码上传文件
static void Main()
{
// Uncomment the following line or manually provide a valid token so that you
// don't have to go through the authorization process each time.
//var accessToken = GetAccessToken();
// var accessToken = new OAuthToken("token", "secret");
var api = new DropboxApi(ConsumerKey, ConsumerSecret, accessToken);
var file = api.UploadFile("dropbox", @"myFolder\b.jpg", @"b.jpg");
Console.WriteLine(string.Format("{0} uploaded.", file.Path));
}
代码中有一条指令我可以使用令牌。所以,我用过 -
var accessToken = "...lkasjdfsdlfjsadlj...";
但它显示无效的参数错误。我应该在哪里使用那把钥匙?
请帮帮忙?
我已从here
获取代码