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
Can SocialNetworkManager.Builder have a #add method? #11
Comments
@geovanisouza92, Thanks :) public SocialNetworkManager build() {
Bundle args = new Bundle();
if (!TextUtils.isEmpty(twitterConsumerKey) && !TextUtils.isEmpty(twitterConsumerSecret)) {
args.putString(PARAM_TWITTER_KEY, twitterConsumerKey);
args.putString(PARAM_TWITTER_SECRET, twitterConsumerSecret);
}
if (!TextUtils.isEmpty(linkedInConsumerKey) && !TextUtils.isEmpty(linkedInConsumerSecret)
&& !TextUtils.isEmpty(linkedInPermissions)) {
args.putString(PARAM_LINKEDIN_KEY, linkedInConsumerKey);
args.putString(PARAM_LINKEDIN_SECRET, linkedInConsumerSecret);
args.putString(PARAM_LINKEDIN_PERMISSIONS, linkedInPermissions);
}
if (facebook) {
args.putBoolean(PARAM_FACEBOOK, true);
}
if (googlePlus) {
args.putBoolean(PARAM_GOOGLE_PLUS, true);
}
SocialNetworkManager socialNetworkManager = new SocialNetworkManager();
socialNetworkManager.setArguments(args);
return socialNetworkManager;
} So, I'm not sure how to add more "social networks" to Builder, maybe it will be possible for SocialNetworkManager, but does it have sense? |
@antonkrasov Thank you for reply quickly. Is really awful that Java doesn't support real injection like C# Extension Methods. Would be easier a lot... Anyway, I think that merge more networks is great. I want to use the library mainly to automate the login logic to use other API methods... |
@geovanisouza92 Yes, good idea, I agree, will try to add ability to add custom SocialNetwork implementations in SocialNetworkManager today or tomorrow. |
@geovanisouza92 I added addSocialNetwork(SocialNetwork socialNetwork) method to SocialNetworkManager, but not completely tested it yet :) |
Thank you @antonkrasov. Let's see how works :) |
Hi!
Thank you for this amazing lib. It helps a lot!
I'd thinking. Is possible to Builder have a #add method to add more "social networks". For example, I want Instagram integration, but the actual lib doesn't have it. So, I can extend OAuthNetwork and implement the logic needed, but, where can I register this new network for manager?
The text was updated successfully, but these errors were encountered: