Why you don't just use hybridauth? This library has already everything you need: https://github.com/hybridauth/hybridauth
My tip: Use version 2, version 3 is still in beta.
lusitanian/oauth and Scopes
Why you don't just use hybridauth? This library has already everything you need: https://github.com/hybridauth/hybridauth
My tip: Use version 2, version 3 is still in beta.