aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java
blob: 4d9a1f220a285d3ddc33d8de913716b11bbc9dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package cgeo.geocaching.twitter;

import cgeo.geocaching.R;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.network.OAuthAuthorizationActivity;

import org.apache.commons.lang3.tuple.ImmutablePair;

public class TwitterAuthorizationActivity extends OAuthAuthorizationActivity {

    public TwitterAuthorizationActivity() {
        super("api.twitter.com",
                "/oauth/request_token",
                "/oauth/authorize",
                "/oauth/access_token",
                true,
                Settings.getKeyConsumerPublic(),
                Settings.getKeyConsumerSecret());
    }

    @Override
    protected ImmutablePair<String, String> getTempTokens() {
        return Settings.getTempToken();
    }

    @Override
    protected void setTempTokens(String tokenPublic, String tokenSecret) {
        Settings.setTwitterTempTokens(tokenPublic, tokenSecret);
    }

    @Override
    protected void setTokens(String tokenPublic, String tokenSecret, boolean enable) {
        Settings.setTwitterTokens(tokenPublic, tokenSecret, enable);
    }

    @Override
    protected String getAuthTitle() {
        return res.getString(R.string.auth_twitter);
    }

    @Override
    protected String getAuthAgain() {
        return res.getString(R.string.auth_again);
    }

    @Override
    protected String getErrAuthInitialize() {
        return res.getString(R.string.err_auth_initialize);
    }

    @Override
    protected String getAuthStart() {
        return res.getString(R.string.auth_start);
    }

    @Override
    protected String getAuthDialogCompleted() {
        return res.getString(R.string.auth_dialog_completed);
    }

    @Override
    protected String getErrAuthProcess() {
        return res.getString(R.string.err_auth_process);
    }

    @Override
    protected String getAuthDialogWait() {
        return res.getString(R.string.auth_dialog_wait);
    }

    @Override
    protected String getAuthDialogPinTitle() {
        return res.getString(R.string.auth_dialog_pin_title);
    }

    @Override
    protected String getAuthDialogPinMessage() {
        return res.getString(R.string.auth_dialog_pin_message);
    }

    @Override
    protected String getAboutAuth1() {
        return res.getString(R.string.about_auth_1);
    }

    @Override
    protected String getAboutAuth2() {
        return res.getString(R.string.about_auth_2);
    }

    @Override
    protected String getAuthAuthorize() {
        return res.getString(R.string.auth_authorize);
    }

    @Override
    protected String getAuthPinHint() {
        return res.getString(R.string.auth_pin_hint);
    }

    @Override
    protected String getAuthFinish() {
        return res.getString(R.string.auth_finish);
    }

}