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

前端 未结 3 1798
伪装坚强ぢ
伪装坚强ぢ 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:32

    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=

    0 讨论(0)
  • 2020-12-28 17:33

    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
    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题