Relationship Methods
/influenced_by
This method allows you to retrieve up to 5 user score pairs (see Response Formats) for users that are influenced by the given influencer in XML or JSON.
GET URL:
http://api.klout.com/1/soi/influenced_by.[xml_or_json]?key=[your_api_key]&users=[users]
Where "[users]" is a comma-delimited string of URL escaped usernames.
POST URL:
http://api.klout.com/1/users/influenced_by.[xml_or_json]?key=[your_api_key]
When posting JSON, the API looks for a JSON string in a variable named "users".
An example JSON post:
<html>
<body>
<form method="POST" action="http://api.klout.com/1/soi/influenced_by.json?key=abcdef">
<input type="hidden" name="users" value='["binhtran","joefernandez"]' id="users">
<p><input type="submit" value="Continue"></p>
</form>
</body>
</html>
/influencer_of
This method allows you to retrieve up to 5 user score pairs (see Response Formats) for users that are influencers of the given user in XML or JSON.
GET URL:
http://api.klout.com/1/soi/influencer_of.[xml_or_json]?key=[your_api_key]&users=[users]
Where "[users]" is a comma-delimited string of URL escaped usernames.
POST URL:
http://api.klout.com/1/users/influencer_of.[xml_or_json]?key=[your_api_key]
When posting JSON, the API looks for a JSON string in a variable named "users".
An example JSON post:
<html>
<body>
<form method="POST" action="http://api.klout.com/1/soi/influencer_of.json?key=abcdef">
<input type="hidden" name="users" value='["binhtran","joefernandez"]' id="users">
<p><input type="submit" value="Continue"></p>
</form>
</body>
</html>
For Rails users, Jason Torres has built a rubygem (untested): http://github.com/jasontorres/klout
3 Comments
ANZU Solutions – 1 year ago
I keep getting a 404 on the /influencer_of REST call. Are you guys sure you got the link right? Oddly, I get a 500 when I tried /influencers_of instead.
Adam K – 1 year ago
It means that the user probably doesn't have any influencers or influence by findings yet. I tried a few different users, and the ones that showed influceners on the website worked with this API
ANZU Solutions – 1 year ago
Adam, you're right, thanks. It didn't work for ericschmidt or barackobama, but ladygaga returned results.
Please sign in to post a comment.