标签: jtwitter

Twitter api - 每小时不超过150个请求

我正在使用jtwitter编写一个推特应用程序 - 它在我工作中的服务器内部运行.无论如何 - 每当我从工作中运行它时,它返回下面的错误,我每小时只发出几个请求:

HTTP/1.1 400 Bad Request
{"request":"/1/statuses/user_timeline.json?count=6&id=cicsdemo&","error":"Rate limit exceeded. Clients may not make more than 150 requests per hour."} ]
2010-06-03 18:44:49 zero.timer.TimerTask::run Thread-3
    SEVERE [ CWPZA3100E: Exception during processing for timer task, "twitterTimer". Exception: java.lang.ClassCastException: winterwell.jtwitter.Twitter$Status incompatible with java.lang.String ]
Run Code Online (Sandbox Code Playgroud)

我从家里运行相同的代码 - 很好.

很明显,在某些时候,Twitter认为我们的工作都来自一个直接IP - 这就是为什么它达到了它不应该达到的极限.

我有任何选择或解决方法 - 我可以从我的直接机器IP - 或我的帐户而不是IP计算限额吗?我可以使用代理吗?有没有其他人有这个问题并解决了它?!

在任何人要求APP必须住在我的工作中之前 - 它无法在其他任何地方运行!

干杯,

安迪

java api twitter http jtwitter

11
推荐指数
1
解决办法
2万
查看次数

Android Jtwitter,身份验证问题

您好我使用JTwitter函数难以使用我的twitter应用程序进行身份验证.我总是得到一个"TwitterException"

这是我的方法

OAuthSignpostClient oauthClient = new OAuthSignpostClient(consumerKey, 
            privateKey, "oob");
Run Code Online (Sandbox Code Playgroud)

一)我不知道"OOB"值应该是什么,它是"callbackURL",并在我的Twitter应用程序,它说"callBack URL: none" ,所以我试图把"none","None"null 在那里"oob",没有不同的结果.

然后其余的是样板

 Intent i = new Intent(Intent.ACTION_VIEW, 
    Uri.parse(oauthClient.authorizeUrl().toString()));
    startActivity(i);
    // get the pin
    String v = oauthClient.askUser("Please enter the verification PIN from Twitter");
    oauthClient.setAuthorizationCode(v);
    // Store the authorisation token details for future use
    String[] accessToken = oauthClient.getAccessToken();
    // Next time we can use new OAuthSignpostClient(OAUTH_KEY, OAUTH_SECRET, 
    //        accessToken[0], accessToken[1]) to avoid authenticating again.

    EditText twitterText = (EditText)findViewById(R.id.twitterText);
    twitterText.getText();

    // …
Run Code Online (Sandbox Code Playgroud)

authentication twitter android jtwitter oauth-2.0

5
推荐指数
1
解决办法
1413
查看次数

使用JTwitter从Twitter帐户注销?

我在Android项目中使用JTwitter,但发现了一个无法解决的问题。基本上,我有两个按钮:Tweet和Logout。我在注销中所做的只是将令牌和令牌秘密设置为null。此后,它要求我再次授权我的应用程序,但不注销我。我没有找到类似“ logout()”之类的方法。是否可以使用JTwitter从我的Twitter帐户注销?这是好事还是坏事?如果不可能,也许Twitter4J有更好的选择吗?

twitter android jtwitter twitter4j

5
推荐指数
1
解决办法
796
查看次数

jtwitter的getPublicTimeline的替代方案

编辑===========

从MANIFEST.MF文件粘贴:

Main-Class: winterwell.jtwitter.Twitter
Implementation-Version: 2.9.0
Implementation-Title: JTwitter client library by Winterwell


Android Studio 0.2.9
jtwitter 2.9.0
Run Code Online (Sandbox Code Playgroud)

你好,

我一直在关注创建yamba客户端的marakana视频.

但是,我注意到getPublicTimeline api调用现在已从jtwitter中删除,因为twitter不再支持此操作.所以我已经厌倦了使用替代方案,但得到了一个错误,我已经剪切并粘贴在下面.

我尝试过的不同API是getFriendsTimeline,getHomeTimeline.

我正在使用的代码片段:

@Override
protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.status);

    edit_status = (EditText)findViewById(R.id.editText);
    tw = new Twitter("student", "password");
    tw.setAPIRootUrl("http://yamba.marakana.com/api");
}

public class GetHomeStatus extends AsyncTask<String, Integer, String>
{
    @Override
    protected String doInBackground(String... statues)
    {
        int i = 0;
        List<winterwell.jtwitter.Status> timeline;

        try {
            timeline = twitter.getFriendsTimeline();
            //twitter.setStatus("Hello, there!");
        }
        catch (TwitterException e) {
            e.printStackTrace();
            return "Failed …
Run Code Online (Sandbox Code Playgroud)

android jtwitter

3
推荐指数
1
解决办法
1121
查看次数

标签 统计

jtwitter ×4

android ×3

twitter ×3

api ×1

authentication ×1

http ×1

java ×1

oauth-2.0 ×1

twitter4j ×1