TumblrAPI-OAuth问题:OAuth验证器和RESTConsole
尝试在Chrome中使用Tumblr的API和RESTConsole获得博客关注者(不构建应用程序,只想检查请求-响应) 我不熟悉Tumblr的API和RESTConsole,所以这里有两个可能的错误源 我已经TumblrAPI-OAuth问题:OAuth验证器和RESTConsole,api,rest,oauth,tumblr,Api,Rest,Oauth,Tumblr,尝试在Chrome中使用Tumblr的API和RESTConsole获得博客关注者(不构建应用程序,只想检查请求-响应) 我不熟悉Tumblr的API和RESTConsole,所以这里有两个可能的错误源 我已经 在Tumblr上注册应用程序,在过程中接收OAuth用户密钥和密钥 进入REST控制台我的目标:{blogname}.tumblr.com/followers 进入REST控制台的“Setup oAuth”窗口,输入我的oAuth使用者密钥和密钥,以及Tumblr的请求令牌URL、访问令
$conskey = "CONSUMER KEY";
$conssec = "CONSUMER SECRET";
$tumblr_blog = "myblog.tumblr.com";
$to_be_posted = "This is the text to be posted";
$oauth = new OAuth($conskey,$conssec);
$oauth->fetch("http://api.tumblr.com/v2/user/following", array('offset'=>0) ,OAUTH_HTTP_METHOD_GET);
$result = json_decode($oauth->getLastResponse());
foreach($result->response->blogs as $key){
echo $key->url;
}