How to Migrate Twitter API from v1 to v1.1?
Solution 1
I was also facing the same problem as Twitter no more supports REST 1.0 from June 11'13. But I fixed the problem by replacing with the latest twitter4j jar file.If you are using twitter4j jar for your application to authenticate with twitter means it will definitely work for you.
1.Download the latest twitter4j from here
2.Replace it with the older one and you are done.
EDIT
Initially after replacing the twitter4j jar, it may show error in package importing. if so then replace
import twitter4j.http.AccessToken;
with
import twitter4j.auth.AccessToken;
Cheers
Solution 2
This has been known for a long time.
You will need to rewrite your communication with the twitter API according to it's documentation which can be found here.
There aren't any specific answers to your question because you don't ask a specific migration question. So either specify what you would like to know, the only proper way to answer this question would be to write an entire twitter application which uses all api calls in v 1.1.
So read the documentation, adjust all your api calls. Make sure authorization is up to 1.1. and test. No tips and tricks, just plain ol' developing.
here are other resources that we’ve pulled together to help make this transition more smooth:
Solution 3
This is worked for me :
You just have to add twitter4j-core-3.0.3.jar and twitpic4j.jar file into your libs folder with your Twitter 1.0 and it will work well.
Download jar file from here : http://code.google.com/p/comp3111-project-team201/downloads/detail?name=twitter4j-core-3.0.3.jar&can=2&q=
Related videos on Youtube
![Aamirkhan](https://i.stack.imgur.com/uJJOm.jpg?s=256&g=1)
Aamirkhan
Updated on June 05, 2022Comments
-
Aamirkhan about 2 years
till now i was using twitter api v1,but my application suddenly stopped twitting,it shows me login failed every time i try to login,when i show response it gives me msg like
{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}
this is written on twiter developer console
Deprecation of v1.0 of the API
Most developers won't need to do much work to transition from v1.0 to v1.1, but we want to make sure there is ample time to do so. We will be providing a 6 month window before turning off v1.0. After retirement (see the platform calendar for dates), the 1.0 endpoints will no longer be available.
i am using twitter4j-core-2.1.11.jar,*signpost-core-1.2.1.1.jar*, & signpost-commonshttp4-1.2.1.1.jar
so i tried to migrate my code from v1 to v1.1,i tried to find solution on twitter developer console regarding this,but could not get a proper way how to do it.
I hope Some one will help me to solve this issue
thanks
ISSUE RESOLVED: PEOPLE WHO ARE FACING TWITTER API MIGRATION ISSUE CAN DOWNLOAD UPDATED API WORKING TWITTER CODE FROM HERE
-change your consumer key and consumer secret key
-
Ganesh about 11 yearsNot working for me. It is giving errors in TwitterApp.java and AccessToken.java files. because the JAR doesn't contain those classes.
-
Spring Breaker about 11 yearsI think you are making mistake in importing the proper package.See my edited answer.
-
hemanth kumar about 11 years@user2012 You are the man..+1 for the import..Could you please post the same at stackoverflow.com/questions/16719134/… so that i can award you the bounty.
-
rahul about 11 years@user2012, I am uploading image to my twitter account, everything is fine now after following your answer but there are two errors which I couldn't resolved 1. import twitter4j.util.ImageUpload; 2. OAuthAuthorization auth = new OAuthAuthorization (conf, conf.getOAuthConsumerKey (), conf.getOAuthConsumerSecret (), new AccessToken (conf.getOAuthAccessToken (), conf.getOAuthAccessTokenSecret ())); ImageUpload upload = ImageUpload.getTwitpicUploader (twitpic_api_key, auth); how can I resolve this, please give me a solution
-
Lokesh almost 11 yearsHi Rahul, did you find out solution for your problem.
-
RAAAAM over 10 yearsThanks, your suggestion makes my day :) its working fin once changing the new twitter4j.