Back to project page ItsTwitterTime.
The source code is released under:
Copyright (c) 2014, Saghm Rossi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * ...
If you think the Android project ItsTwitterTime listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package me.saghm.itstwittertime; //from www . j av a2s .c o m import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; import android.util.Log; import twitter4j.TwitterException; import twitter4j.auth.RequestToken; public class LoginTask extends AsyncTask<Start, Void, Void> { protected Void doInBackground(Start...s) { try { s[0].twitter.setOAuthAccessToken(null); RequestToken token = s[0].twitter.getOAuthRequestToken("oauth://itstwittertime"); s[0].startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse(token.getAuthenticationURL())) ); } catch(TwitterException e) { Log.i("exception", ExceptionParser.parse(e)); } return null; } }