开发者

yahoo answers API

I want to make use of the Yahoo answers API开发者_如何学运维 to extract the answers, I have got my consumer key which I guess is ncessary to get an access to the answers posted on the website. Can anybody guide me as to how can I make use of this API from my application.


OK, since you expanded on your question, I'll point you in the right direction at least:

You say you want to get the answers for a particular question. That is achieved by making a GET request to the getQuestion method, which is documented at that link, so I won't repeat the instructions here.

This method requires you to know the Yahoo! Answers question_id, which you can either hard-code by taking it from the URL of a known question, or search for it using the other API methods such as questionSearch.

The response you get back will be XML, and the answers to the specific question will be in there - among other data such as the answerer's nickname, timestamps etc.

You'll need to parse this response to get the info you need.

If you need help making a GET request using Perl, I'd take a look at this question here first, but it's essentially:

use LWP::Simple;
$contents = get("http://YOUR_URL_HERE");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜