0

我只是想制作一个雅虎启动,向我的应用程序的注册用户发送即时消息。我花了几个小时在网上搜索如何做到这一点,但雅虎开发人员文档很烂。首先,我不知道我应该使用哪些服务器进行授权、登录和消息传递。我有一个消费者密钥,我尝试按照这些步骤操作,但没有任何效果。

欢迎任何意见/建议。

4

1 回答 1

0

The documentation looks to be very good, I think the issue here is that your knowledge of how REST API's work in general is a bit lacking.

Let's talk about diagram #2: Get a request token using: get_request_token.

get_request_token is part of an HTTP endpoint, and in their diagram they want you to pass in a handful of parameters to validate your request.

  • oauth_consumer_key
  • oauth_nonce
  • oauth_signature_method
  • etc

(If you need more clarification of any step you can find it in the tree view on the left hand side of the page)

The request URL:

https://api.login.yahoo.com/oauth/v2/get_request_token.

Now at this point you can either use the HTTP GET or POST verb. If you decide to use GET you will need to include those above parameters as a query string.

?oath_consumer_key=myConsumerKey&oauth_nonce=oathNonce etc

I will leave it to you to write the associated C# code. You'll want to start off with the HttpWebRequest.Create() method

于 2012-06-03T18:47:30.233 回答