如何将 Twitter API 从 v1 迁移到 v1.1? [英] How to Migrate Twitter API from v1 to v1.1?

查看:36
本文介绍了如何将 Twitter API 从 v1 迁移到 v1.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到现在我都在使用 twitter api v1,但我的应用程序突然停止了 twitting,每次我尝试登录时都显示我登录失败,当我显示响应时,它给了我类似 msg

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": "Twitter REST API v1 不再处于活动状态.请迁移到 API v1.1.https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}

这是在 twiter 开发者控制台上写的

this is written on twiter developer console

弃用 API 的 v1.0

大多数开发人员不需要做太多工作就可以从 v1.0 过渡到 v1.1,但我们希望确保有足够的时间这样做.在关闭 v1.0 之前,我们将提供 6 个月的窗口.停用后(有关日期,请参阅平台日历),1.0 端点将不再可用.

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.

我正在使用 twitter4j-core-2.1.11.jar、*signpost-core-1.2.1.1.jar*、&signpost-commonshttp4-1.2.1.1.jar

i am using twitter4j-core-2.1.11.jar,*signpost-core-1.2.1.1.jar*, & signpost-commonshttp4-1.2.1.1.jar

所以我试图将我的代码从 v1 迁移到 v1.1,我试图在 twitter 开发者控制台上找到关于此的解决方案,但无法找到正确的方法.

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

谢谢

问题已解决:面临 TWITTER API 迁移问题的人们可以从 此处

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

推荐答案

我也面临着同样的问题,因为 Twitter 从 2013 年 6 月 11 日起不再支持 REST 1.0.但我通过替换为最新的 twitter4j jar 文件解决了这个问题.如果您的应用程序使用 twitter4j jar 来通过 twitter 进行身份验证,则意味着它肯定适合您.

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.从这里

2.用旧的替换它,你就完成了.

2.Replace it with the older one and you are done.

编辑

最初更换 twitter4j jar 后,可能会在包导入时显示错误.如果是,则替换

Initially after replacing the twitter4j jar, it may show error in package importing. if so then replace

import twitter4j.http.AccessToken;

import twitter4j.auth.AccessToken;

干杯

这篇关于如何将 Twitter API 从 v1 迁移到 v1.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆