Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8332793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:49:26+00:00 2026-06-09T02:49:26+00:00

After the login flow, I store access token and accesss token secret in prefs.

  • 0

After the login flow, I store access token and accesss token secret in prefs. Now I want to post image to Twitter using TwitPic.

Updated: I tried to set date&time on device to automatic. The callback URL in my Twitter app exists. It still shows error.

My code

public static boolean tweetMessageAndPhoto(final String message, final String photoPath) {
    final ConfigurationBuilder cb = new ConfigurationBuilder();
    cb.setDebugEnabled(true);
    cb.setOAuthAccessToken(getAccessTokenStr());
    cb.setOAuthAccessTokenSecret(getAccessTokenSecretStr());
    cb.setOAuthConsumerKey(Constant.CONSUMER_KEY);
    cb.setOAuthConsumerSecret(Constant.ACCESS_TOKEN_SECRET);
    cb.setMediaProviderAPIKey(Constant.MEDIA_KEY);              
    final Configuration conf = cb.build();

    final ImageUpload upload = new ImageUploadFactory(conf).getInstance(MediaProvider.TWITPIC);

    try {
        final String uri = upload.upload(new File(photoPath), message);
        System.out.println("================URI: " + uri);
        return true;
    } catch (final TwitterException e) {
        e.printStackTrace();
        ShowLog.showLogError(TAG, "Could not tweet. Please try again.");
    }
    return false;
}

I get this error:

W/System.err(14566): Received authentication challenge is nullRelevant discussions can be on the Internet at:
W/System.err(14566):    http://www.google.co.jp/search?q=ea09dc6d or
W/System.err(14566):    http://www.google.co.jp/search?q=049b821e
W/System.err(14566): TwitterException{exceptionCode=[ea09dc6d-049b821e 0237e8c8-8ed4bd69], statusCode=-1, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.3}
W/System.err(14566):    at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:204)
W/System.err(14566):    at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
W/System.err(14566):    at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:114)
W/System.err(14566):    at twitter4j.media.AbstractImageUploadImpl.upload(AbstractImageUploadImpl.java:111)
W/System.err(14566):    at twitter4j.media.AbstractImageUploadImpl.upload(AbstractImageUploadImpl.java:80)
W/System.err(14566):    at app.jp.cropnet.twitter.TwitterHelper.tweetMessageAndPhoto(TwitterHelper.java:121)
W/System.err(14566):    at app.jp.cropnet.twitter.TwitterDemoActivity.tweetMessageAndPhoto(TwitterDemoActivity.java:81)
W/System.err(14566):    at app.jp.cropnet.twitter.TwitterDemoActivity.access$1(TwitterDemoActivity.java:78)
W/System.err(14566):    at app.jp.cropnet.twitter.TwitterDemoActivity$2.onClick(TwitterDemoActivity.java:40)
W/System.err(14566):    at android.view.View.performClick(View.java:2461)
W/System.err(14566):    at android.view.View$PerformClick.run(View.java:8890)
W/System.err(14566):    at android.os.Handler.handleCallback(Handler.java:587)
W/System.err(14566):    at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err(14566):    at android.os.Looper.loop(Looper.java:123)
W/System.err(14566):    at android.app.ActivityThread.main(ActivityThread.java:4627)
W/System.err(14566):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(14566):    at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err(14566):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
W/System.err(14566):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
W/System.err(14566):    at dalvik.system.NativeStart.main(Native Method)
W/System.err(14566): Caused by: java.io.IOException: Received authentication challenge is null
W/System.err(14566):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:1694)
W/System.err(14566):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:1649)
W/System.err(14566):    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:1374)
W/System.err(14566):    at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:117)
W/System.err(14566):    at twitter4j.internal.http.HttpResponseImpl.<init>(HttpResponseImpl.java:35)
W/System.err(14566):    at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:168)
W/System.err(14566):    ... 19 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:49:27+00:00Added an answer on June 9, 2026 at 2:49 am

    If you are using simulator, this should work fine,
    and if you are getting error only on real device, please check that the sim card you inserted in the phone has automatic time update feature enable.
    I once got into the problem, changing sim card from other network solved my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using django social-auth authentication for my app.After login to facebook or twitter from
Im trying to test my successfully creates a new user after login (using authlogic).
I am using following steps to update code on server after login to server:
after login page I want show the A for Apple,B for Boy....ect upto F..in
I have implanted a login code to a site , after that I want
In my application after login I am going into home page. But from home
My situation is after login my website I wanted to show how many employees
I am Calling an Applet Class After Login. The form is Visible but the
i have created one login and register view in that view after login user
I need to launch an app I've made just after login, before anything else

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.