GithubHelp home page GithubHelp logo

winterstein / jtwitter Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 27.0 3.48 MB

Java library for using Twitter (+ Identica & Wordpress). Open source under LGPL

Home Page: http://www.winterwell.com/software/jtwitter.php

Java 100.00% Roff 0.01%

jtwitter's People

Contributors

azonli avatar geoffballinger avatar joehalliwell avatar rsaab avatar vrsbrazil avatar winterstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jtwitter's Issues

AndroidTwitterLogin

onPageStarted is called twice. I haven't identified why - It could be an Android OS/device specific for the handling of the WebView.

The first received url is correct, the second is logged as someurl.com/mf.php - therefore verifier == null and onFail is subsequently called

Suggest adding to line 92:

if ( ! url.contains(callbackUrl)) return;

to become:

if ( ! url.contains(callbackUrl) && ! url.endsWith("mf.php")) return;

Or if this is too specific, prevent onFail being called if onSuccess has already been called:

if ( ! url.contains(callbackUrl) && ! success) return;

Where:

boolean success = false;

Is placed inside run() and set to true prior to line 106:

dialog.dismiss();
onSuccess(jtwitter, tokens);

Email me if you need any more info.

Cheers

Ben

Current code depends on winterwell.utils library

I wanted to compile your library from source to use with a Java 7 project but I had trouble finding the winterwell.utils code that JTwitter depends on. From previous change log entries (3.1.0: - Cleaned out some winterwell.utils references which had sneaked into /src.) it seems like this was an oversight. I managed to find a version of the winterwell.utils library in the Eclipse Markdown Editor Plugin repo but it's not clear if this is 100% compatible. Could you remove the dependencies on this library or provide an up-to-date version of the library that can be used when compiling from source? Thanks.

JTwitter won't work on Android

I'm trying to use JTwitter in an Android app, but it doesn't work because OAuthScribeClient uses DefaultOAuthProvider, not CommonsHttpOAuthProvider

I tried forking the repo and changing this myself, but there are some dependencies I'm missing.

OAuth NullPointerException

Following the example on the website everything works until I get to getOAuthAccessToken:

java.lang.NullPointerException
  at twitter4j.HttpParameter.containsJson(HttpParameter.java:171)
  at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:129)
  at twitter4j.HttpClientBase.request(HttpClientBase.java:57)
  at twitter4j.HttpClientBase.post(HttpClientBase.java:86)
  at twitter4j.auth.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:125)
  at twitter4j.TwitterBaseImpl.getOAuthAccessToken(TwitterBaseImpl.java:340)

Any feedback on how to resolve this issue?

Run jtwitter.jar can not work

Command Line: java -jar jtwitter.jar {username} {password} tweet
Console Display:

Exception in thread "main" winterwell.jtwitter.TwitterException$IO: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at winterwell.jtwitter.URLConnectionHttpClient.getPage2_ex(URLConnectionHttpClient.java:317)
at winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:392)
at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2910)
at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2845)
at winterwell.jtwitter.Twitter.setStatus(Twitter.java:2633)
at winterwell.jtwitter.Twitter.main(Twitter.java:719)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:961)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at winterwell.jtwitter.URLConnectionHttpClient.post2_connect(URLConnectionHttpClient.java:432)
at winterwell.jtwitter.URLConnectionHttpClient.post2(URLConnectionHttpClient.java:402)
at winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:370)
... 4 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496)
... 19 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
... 25 more

AndroidTwitterLogin Exception

Calling run() on the AndroidTwitterLogin class results in an java.lang.NoSuchMethodError Exception.

AndroidTwitterLogin login = 
    new AndroidTwitterLogin(this, CONSUMER_KEY, CONSUMER_SECRET, null) {
        @Override
        protected void onSuccess(Twitter arg0, String[] arg1) {
            Toast.makeText(SearchResultsActivity.this, "Login successful", Toast.LENGTH_LONG).show();
    }
};
login.run();

results in

java.lang.NoSuchMethodError: android.util.Log.i
at winterwell.jtwitter.android.AndroidTwitterLogin.run(AndroidTwitterLogin.java:78)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.