The second error message indicates that you're passing in an AppDelegate when you should be passing in a ViewController. It sounds like you're running authorizeFromController in your AppDelegate instead of your ViewController. Move it to your ViewController code.
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?