質問

I am developing an application in C#, and when I make a call to the klout API like this:

http://api.klout.com/v2/identity.json/twitter?screenName=SteveMartinToGo

It always returns Not authorized.

I got this from http://klout.com/s/developers/v2.

I even tried to use the API key, but that didn't work out, too:

http://api.klout.com/1/klout.[return_type]?key=[api_key]&users=john.

Can anyone who has worked with the klout API before help me?

役に立ちましたか?

解決

You must always specify your API key when making a call to Klout v2. Without it, you'll get the error you've been receiving.

Properly formatted requests (with keys masked) would look like:

http://api.klout.com/v2/identity.json/twitter?screenName=barackobama&key=XXXXXXXXX
http://api.klout.com/v2/user.json/2055/score?key=XXXXXXXXX

The v1 API seems to return 403 Not Authorized for any call, regardless of whether you supplied your API key, so I'd stick with issuing calls to the v2 API.

Note that Klout has an interactive console located at http://developer.klout.com/io-docs that should auto-populate with your API key. You can use the request strings it generates in your application, just make sure you target Partner API BETA.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top