English 中文(简体)
• 如何利用tw头4j图书馆对 t进行“ne”搜查?
原标题:How to perform "near" search for tweets using twitter4j library?

我试图利用某些地点附近的 t子进行“ne”研究。

tw4j,但例外。

public static void main(String[] args) {
    Twitter twitter = new TwitterFactory().getInstance();
    try {
        String searchTerm = "jobs near:"san francisco"";
        QueryResult result = twitter.search(new Query(searchTerm));
        List<Tweet> tweets = result.getTweets();
        for (Tweet tweet : tweets) {
            System.out.println("@" + tweet.getFromUser() + " - " + tweet.getText());
        }
    } catch (TwitterException te) {
        te.printStackTrace();
        System.out.println("Failed to search tweets: " + te.getMessage());
    }
}

除此以外,我正在

403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following). {"error":"Invalid parameter"} Relevant discussions can be on the Internet at: http://www.google.co.jp/search?q=d35baff5 or http://www.google.co.jp/search?q=08c3b248 TwitterException{exceptionCode=[d35baff5-08c3b248], statusCode=403, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.5}Failed to search tweets: 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following). {"error":"Invalid parameter"}

at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:85)
at twitter4j.TwitterImpl.get(TwitterImpl.java:1895)
at twitter4j.TwitterImpl.search(TwitterImpl.java:98)
at com.xebia.lightning.scheduler.JobTweetsArchiver.main(JobTweetsArchiver.java:115)
问题回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签