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

前端 未结 3 1819
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 17:20

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

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 17:36

    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

提交回复
热议问题