Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Migrate Twitter API from v1 to v1.1?

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

like image 840
Aamirkhan Avatar asked Jun 13 '13 09:06

Aamirkhan


People also ask

What are the Twitter v2 endpoints?

Tweets received from the following endpoints count towards this monthly Tweet cap: Recent search: GET /2/tweets/search/recent. Filtered stream: GET /2/tweets/search/stream. User Tweet timeline: GET /2/users/:id/tweets.

How far back does Twitter API data go?

30-Day Search API provides data from the previous 30 days. Full-Archive Search API provides complete and instant access to the full corpus of Twitter data dating all the way back to the first Tweet in March 2006.


2 Answers

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

like image 175
Spring Breaker Avatar answered Sep 19 '22 07:09

Spring Breaker


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:

  • FAQ: What does API v1 Retirement entail?
  • API v1.1 Overview
  • Embedded Timelines Documentation
like image 37
Timmetje Avatar answered Sep 21 '22 07:09

Timmetje