tilak
tilak

Reputation: 4701

twitter image upload (twitpic api)- unable find image upload method

I am new to android development. I need to post text and image in twitter through my Android application.

I got one sample project AndroidTwitpic. I had problem in connection. Later I replaced twitter4j-core-2.1.6.jar library with twitter4j-core-3.0.3.jar library. Now the connection to Twitter is working fine but am getting error like:

ImageUpload cannot be resolved to a type.

Is there any library required to add? What is the mistake I have done?

Upvotes: 1

Views: 573

Answers (3)

patient
patient

Reputation: 41

See this tutorail its very helpful Twitt pic with text

Upvotes: 1

Siddharth Lele
Siddharth Lele

Reputation: 27748

Not entirely sure how things were placed prior to the Twitter4J 3.0.2 (I wasn't working on it then). However, somewhere in between versions, they seem to have changed the library (speculation on my part).

For uploading Media of any kind, you need an additional library called twitter4j-media-support-3.0.3.jar. You can download it here:

http://grepcode.com/snapshot/repo1.maven.org/maven2/org.twitter4j/twitter4j-media-support/3.0.3 (Choose the Binary download option on the page).

Alternative Links:

  1. http://mvnrepository.com/artifact/org.twitter4j/twitter4j-core/3.0.3
  2. http://www.java2s.com/Code/Jar/t/Downloadtwitter4jmediasupportjar.htm (Make sure you search for the latest version. It has a long list of earlier versions too)
  3. http://twitter4j.org/maven2/org/twitter4j/twitter4j-media-support/3.0.3/

Upvotes: 0

Shani Goriwal
Shani Goriwal

Reputation: 2104

You need to add other libraries:

signpost-commonshttp4-1.2.1.1.jar
signpost-core-1.2.1.1.jar
signpost-jetty6-1.2.1.1.jar

Upvotes: 1

Related Questions