com.twitter.sdk.android.core.DefaultLogger Java Examples
The following examples show how to use
com.twitter.sdk.android.core.DefaultLogger.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LoginActivity.java From Simple-Blog-App with MIT License | 6 votes |
private void twitter() { TwitterConfig config = new TwitterConfig.Builder(this) .logger(new DefaultLogger(Log.DEBUG)) .twitterAuthConfig(new TwitterAuthConfig(getResources().getString(R.string.com_twitter_sdk_android_CONSUMER_KEY), getResources().getString(R.string.com_twitter_sdk_android_CONSUMER_SECRET))) .debug(true) .build(); Twitter.initialize(config); twitterLoginButton.setCallback(new Callback<TwitterSession>() { @Override public void success(Result<TwitterSession> result) { Log.d(TAG, "twitterLogin:success" + result); handleTwitterSession(result.data); } @Override public void failure(TwitterException exception) { Log.w(TAG, "twitterLogin:failure", exception); } }); }
Example #2
Source File: TweetUiTestCase.java From twitter-kit-android with Apache License 2.0 | 6 votes |
@Override protected void setUp() throws Exception { super.setUp(); createMocks(); // Initialize Fabric with mock executor so that kit#doInBackground() will not be called // during kit initialization. final TwitterConfig config = new TwitterConfig.Builder(getContext()) .logger(new DefaultLogger(Log.DEBUG)) .executorService(mock(ThreadPoolExecutor.class)) .build(); Twitter.initialize(config); final TwitterCore twitterCore = TwitterCoreTestUtils.createTwitterCore( new TwitterAuthConfig("", ""), clients, apiClient); tweetUi = TweetUi.getInstance(); final TweetRepository tweetRepository = new TweetRepository(mainHandler, mock(SessionManager.class), twitterCore); tweetUi.setTweetRepository(tweetRepository); tweetUi.setImageLoader(picasso); }
Example #3
Source File: TwitterLoginInstance.java From ShareLoginPayUtil with Apache License 2.0 | 5 votes |
public TwitterLoginInstance(Activity activity, final LoginListener listener, final boolean fetchUserInfo) { super(activity, listener, fetchUserInfo); TwitterConfig config = new TwitterConfig.Builder(activity) .logger(new DefaultLogger(Log.DEBUG)) .twitterAuthConfig(new TwitterAuthConfig(ShareManager.CONFIG.getTwitterConsumerKey(), ShareManager.CONFIG.getTwitterConsumerSecret())) .debug(BuildConfig.DEBUG).build(); Twitter.initialize(config); mTwitterAuthClient = new TwitterAuthClient(); }
Example #4
Source File: TwitterNetwork.java From EasyLogin with MIT License | 5 votes |
public TwitterNetwork(Activity activity, String consumerKey, String consumerSecret) { TwitterAuthConfig authConfig = new TwitterAuthConfig(consumerKey, consumerSecret); TwitterConfig config = new TwitterConfig.Builder(activity.getApplicationContext()) .logger(new DefaultLogger(Log.DEBUG)) .twitterAuthConfig(authConfig) .build(); Twitter.initialize(config); }
Example #5
Source File: ThirdLoginManager.java From FimiX8-RE with MIT License | 4 votes |
public static final void initThirdLogin(Context context) { Twitter.initialize(context); Twitter.initialize(new Builder(context).logger(new DefaultLogger(3)).twitterAuthConfig(new TwitterAuthConfig(context.getResources().getString(R.string.twitter_CONSUMER_KEY), context.getResources().getString(R.string.twitter_CONSUMER_SECRET))).debug(true).build()); }