Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
donaldp
7 years agoCollaborator | Level 9
RespondPageWithJSRedirect() - where is this defined?
Hi, I am trying to set-up a Dropbox connection in .NET (Xamarin to be precise). I am following http://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm. When I start ty...
- 7 years ago
Apologies for the confusion! The SDK doesn't offer an implementation of RespondPageWithJSRedirect. That's intended to be whatever page you wish to show to the user at that point in the process. (E.g., it can optionally contain a message for the user, and whatever branding/styling you want for your app.)
Here's where this is done in the example, and here's the HTML page, including the minimum JavaScript necessary, used for that example.
donaldp
7 years agoCollaborator | Level 9
Hi Greg,
> Are you getting that error when trying to run the "SimpleTest" sample app?
I was coding my own test app from scratch, but following those 2 examples, so the answer is yes, kinda. Your remark has made me think I'll just try running the whole SimpleTest as is, and see if that works for me as is... but as I've found previously (like missing usings), there's a bunch of details that have been left out. See below for all the error messages I got.
> Is there any other output in the log?
Lots of messages, as usual, but only 2 errors. The 2nd was with the httplistener, and was further down, so may have been a flow-on from the first error. trying to fix the 1st error 1st, and see if that also fixes the 2nd error.
> To clarify, are you also trying to run the "SimpleTest" on Android? That sample wasn't written for Android, nor does the .NET SDK itself officially support Android.
As mentioned, I'm using Xamarin, which supports UWP, iOS and Android (plus some other platforms too). Coding is done in C#/.NET, and Xamarin takes care of the platform stuff in the background. They do have a Xamarin.Dropbox.Api - apparently they had to do a few hacks to make the Dropbox.Api work with Xamarin (maybe related to the fact that .NET doesn't officially support Android?) - and that is the one I'm using. It's available in nuget.
> Based on that code snippet, the redirect URI would be "http://127.0.0.1:52475/authorize".
Thanks.
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'WebRequestHandler' could not be found (are you missing a using directive or an assembly reference?) SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 67 Active
Error CS0103 The name 'Settings' does not exist in the current context SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 220 Active
Error CS0103 The name 'Settings' does not exist in the current context SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 224 Active
Error CS0103 The name 'ApiKey' does not exist in the current context SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 232 Active
Error CS0103 The name 'Settings' does not exist in the current context SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 261 Active
Error CS0103 The name 'Settings' does not exist in the current context SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 262 Active
Error CS0103 The name 'Settings' does not exist in the current context SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 264 Active
Error CS1061 'FullAccount' does not contain a definition for 'RootInfo' and no accessible extension method 'RootInfo' accepting a first argument of type 'FullAccount' could be found (are you missing a using directive or an assembly reference?) SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 343 Active
Error CS1061 'DropboxClient' does not contain a definition for 'WithPathRoot' and no accessible extension method 'WithPathRoot' accepting a first argument of type 'DropboxClient' could be found (are you missing a using directive or an assembly reference?) SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 352 Active
Error CS0426 The type name 'Root' does not exist in the type 'PathRoot' SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 352 Active
Error CS1061 'FullAccount' does not contain a definition for 'RootInfo' and no accessible extension method 'RootInfo' accepting a first argument of type 'FullAccount' could be found (are you missing a using directive or an assembly reference?) SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 352 Active
Error CS0246 The type or namespace name 'PathRootException' could not be found (are you missing a using directive or an assembly reference?) SimpleTest D:\Users\Donald\Source\Repos\SimpleTest\SimpleTest\SimpleTest\App.cs 355 Active
Greg-DB
Dropbox Community Moderator
7 years agoI see, thanks. I do recommend starting from the unmodified SimpleTest on a supported platform as a reference, as that should work out of the box with no modifications (beyond plugging in your own app key). That's what I tested, and it worked for me.
Anyway, unfortunately the SDK isn't officially supported in Xamarin, so we can't offer support for that platform. I'll send this along as a feature request for official support for that though. We can't officially support that third party library either of course, as that's maintained by a third party.
- donaldp7 years agoCollaborator | Level 9
Dropbox won't let me register another app called SimpleTest so that I can get my own apikey for it - can you supply the apikey for it? Or if I use one I have already, will that work if the names don't match? I've tried to work around this restriction, with no success so far. i.e. tried to clone SimpleTest, calling it something different in the process, however when I click "fork", it forks the whole .net library, not just SimpleTest itself. Not sure how to get around this restriction on unique app names (or that it won't let me fork just that directory).
- DBX_Robert7 years ago
Dropbox Staff
The reason you cannot register a duplicate Dropbox App with the same name is because Dropbox requires App names be unique. I do not believe you need to create a new Dropbox app for your use case. It is okay if the name of your app registered with Dropbox and the name of the .NET project do not match.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!