Allow user to link to other accounts after logged in

After the user has logged in, I want to connect to some additional accounts (spotify, soundcloud). Can someone point me to some documentation, or explain the best approach to connecting additional accounts to a user?

I found this, but it does offer any code to accomplish this: