我使用 YQL:js 来获取数据。
我在https://developer.yahoo.com/yql/console/做:
select * from twitter.friends where id='some_not_private_account'
它工作完美。它返回朋友列表。现在我对私人帐户做同样的事情:
select * from twitter.friends where id='some_private_account' and
oauth_consumer_key='some_key' and
oauth_consumer_secret='some_secret' and
oauth_token='some_token' and
oauth_token_secret='some_token_secret'
调试中没有任何错误,但结果部分为空。为什么?我做错了什么?
#更新1:
这是带有调试和诊断选项的 xml 答案:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
yahoo:count="0" yahoo:created="2012-07-22T13:09:23Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>true</publiclyCallable>
<url execution-start-time="361" execution-stop-time="363"
execution-time="2" proxy="DEFAULT"><![CDATA[http://www.datatables.org/twitter/twitter.friends.xml]]></url>
<url execution-start-time="367" execution-stop-time="849"
execution-time="482" proxy="DEFAULT"><![CDATA[http://zachgrav.es/twitter/yql/oauth.utils.js]]></url>
<url execution-start-time="850" execution-stop-time="909"
execution-time="59" proxy="DEFAULT"><![CDATA[http://oauth.googlecode.com/svn/code/javascript/oauth.js]]></url>
<url execution-start-time="912" execution-stop-time="943"
execution-time="31" proxy="DEFAULT"><![CDATA[http://oauth.googlecode.com/svn/code/javascript/sha1.js]]></url>
<url execution-start-time="965" execution-stop-time="1253"
execution-time="288" proxy="DEFAULT"><![CDATA[http://api.twitter.com/1/friends/ids/some_private_account.xml]]></url>
<javascript execution-time="888" instructions-used="1032031" table-name="twitter.friends"/>
<user-time>1254</user-time>
<service-time>1187</service-time>
<build-version>28958</build-version>
</diagnostics>
<results/>
</query>
更新 2:
http://i.stack.imgur.com/nuFw1.jpg
更新 3: 我的查询