【问题标题】:Not getting tweets using FHSTwitterEngine没有使用 FHSTwitterEngine 获取推文
【发布时间】:2014-02-12 05:44:05
【问题描述】:

我正在使用最新的 FHSTwitterEngine 库。我想从所有用户那里获取最近的 20 条推文。

我正在尝试这样做。

self.engine = [[FHSTwitterEngine alloc] init];
[self.engine permanentlySetConsumerKey:TWITTER_CONSUMER_KEY andSecret:TWITTER_SECRET_KEY];

id res = [self.engine searchTweetsWithQuery: @"cricket" count:10 resultType:FHSTwitterEngineResultTypeRecent unil:[NSDate date] sinceID:@"1920030" maxID:@"1930030"];

NSLog(@"%@",res);

当我这样做时,我会收到此响应。

Error Domain=FHSErrorDomain Code=401 "You are not authorized via OAuth" UserInfo=0xe5cbce0 {url=https://api.twitter.com/1.1/search/tweets.json, parameters={
    count = 10;
    "include_entities" = false;
    "max_id" = 1930030;
    q = cricket;
    "result_type" = recent;
    "since_id" = 1920030;
    until = "2014-01-22";
}, NSLocalizedDescription=You are not authorized via OAuth}

我错过了什么吗?

【问题讨论】:

    标签: ios iphone twitter tweets fhs-twitter-engine


    【解决方案1】:

    试试这个

    追加

    [[self.engine sharedEngine]setDelegate:self];
    [[self.engine sharedEngine]loadAccessToken];
    

    【讨论】:

    • 但我只想要公共推文,我没有用户令牌。我可以使用 loadAccessToken()
    猜你喜欢
    • 1970-01-01
    • 2014-07-18
    • 1970-01-01
    • 1970-01-01
    • 2016-12-03
    • 2015-08-27
    • 2018-06-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多