-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social network with id = FACEBOOK already exists #9
Comments
This exception is only thrown when you call addSocialNetwork() and the network already exists. |
try this : ArrayList<String> connectedNetwork = new ArrayList<>();
for (SocialNetwork socialNetwork : easyLogin.getInitializedSocialNetworks()) {
Log.i("Social Login", socialNetwork.getNetwork().name());
connectedNetwork.add(socialNetwork.getNetwork().name());
}
if(!connectedNetwork.contains("FACEBOOK"))
easyLogin.addSocialNetwork(new FacebookNetwork(this, fbScope));
if(!connectedNetwork.contains("GOOGLE_PLUS"))
easyLogin.addSocialNetwork(new GooglePlusNetwork(this)); |
@maksim88 this error occurs when i click login button second times ,it happens |
@hynra here is a solution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EasyLogin.initialize();
easyLogin = EasyLogin.getInstance();
List fbScope = Arrays.asList("public_profile", "email");
// error occurs on this line
easyLogin.addSocialNetwork(new FacebookNetwork(this, fbScope));
What should I do to avoid this Exception?
The text was updated successfully, but these errors were encountered: