【问题标题】:Twitter rest api "/1.1/statuses/home_timeline.json" return blankTwitter rest api "/1.1/statuses/home_timeline.json" 返回空白
【发布时间】:2018-03-06 07:41:19
【问题描述】:

此链接是发布推文。 https://dev.twitter.com/oauth/overview/authorizing-requests

我的应用是通过该链接在推文中完成的。

但是https://dev.twitter.com/rest/reference/get/statuses/user_timeline

我正在编程 user_timeline。但我做不到。

只返回空白。

我的 iPhone 应用的 OAuth 已通过 https://dev.twitter.com/oauth/overview/authorizing-requests 链接正确验证。

为什么返回空白?

我该怎么做? User_timeline 不需要 OAuth?

我编程 User_timeline 应用了我的 oauth,不是吗?

是否被 twitter 公司屏蔽了?

【问题讨论】:

  • 我不认为你在这里问什么很清楚。您能否添加一些用于调用 API 的 HTTP 操作的代码或详细信息,以便人们看到您可能出错的地方?

标签: swift twitter oauth timeline


【解决方案1】:

你可以使用https://github.com/jublonet/codebird-php/blob/develop/src/codebird.php的codebird。

时间线信息是

$cb->setToken($_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);

$reply = (array) $cb->statuses_homeTimeline();
print_r($reply);

【讨论】:

  • 谢谢你的回答。但我使用 SWIFT。我真的很想知道为什么 twitter 公司被屏蔽了。
猜你喜欢
  • 2017-06-30
  • 2014-08-02
  • 2014-02-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-07-04
  • 1970-01-01
  • 2011-11-11
相关资源
最近更新 更多