What is the intended way to get the list of friends (server side) when the same application is used to authentication with the Google Identity Toolkit?
With the Facebook graph API it is possible to get the list of friends: https://graph.facebook.com/v2.3/me/friends
- An access token is needed
- The permission user_friends is needed
Can I get the access token from the GitKit somehow?
- Or a second login with the Facebook-Graph-Api is needed on the client side
The user_friends permission is not asked when logging in with GitKit
- Is there a way to extend the permissions for login?
Probably similar questions will occur when I try to get the google+ friends using the same application.
A social Login without using any social "feature" does not really make sense for me and I hope there is a way to achieve that with the Gitkit.
To add extra permissions to the Identity Toolkit login on Android, add the identitytoolkit.extra_scopes metadata to the manifest. It would look something like:
Once login is complete, the Facebook SDK will be initialized with the proper token, so you can retrieve the Access Token via AccessToken.getCurrentAccessToken(). Because Facebook tokens are portable, you can send the one retrieved from your application to the backend and use it with the graph API.