Android Open Source - ItsTwitterTime Login Task






From Project

Back to project page ItsTwitterTime.

License

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.

Java Source Code

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;
    }
}




Java Source Code List

me.saghm.itstwittertime.ApplicationTest.java
me.saghm.itstwittertime.AuthTask.java
me.saghm.itstwittertime.Connector.java
me.saghm.itstwittertime.ExceptionParser.java
me.saghm.itstwittertime.GetUserTask.java
me.saghm.itstwittertime.LoginTask.java
me.saghm.itstwittertime.Start.java
me.saghm.itstwittertime.Start.java
me.saghm.itstwittertime.Tweet.java