質問

I am testing the Klout API and in returns 400 status with some valid Twitter users. For example:

http://api.klout.com/v2/user.json/622834/score?key=MYKEY

The JSON response is:

{
    {
        validationErrors: {
        kloutId: "value [622834] fails with 'invalid KloutId [622834]'"
    }
}

This is twitter user 14902334 BodyofBreen, he's a valid user. We had this Klout ID from one of the previous API calls. Klout API docs say that Klout IDs never change. Anyway, I tried to get a Klout ID for this user this way:

http://api.klout.com/v2/identity.json/twitter?screenName=BodyOfBreen&key=MYKEY
http://api.klout.com/v2/identity.json/tw/14902334?key=MYKEY

But they both return 404 status. Is there anything I'm doing wrong?

役に立ちましたか?

解決

The most likely case is that the user has opted out of Klout, or is no longer active on Twitter. We don't report the 'reason' for the 404 so as not to disclose additional information about such a user, or to "scarlet letter" them.

For more information about the potential reasons for a 404 response:

http://klout.com/s/developers/v2#errors

Best practice in the case of receiving a 404 on a "known good Klout ID" or Twitter handle/ID would be to discard the data and requery. It's possible the user becomes active again, re-opts in, or otherwise has data again in the future.

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