Klout API Codeigniter PHP Library
Leverage influence in your application. Knowing who’s important on any given topic or in a certain situation is a game-changer for many applications. Klout API lets you easily integrate Klout score and influence to take your app to the next level.
Here is the first release of my Codeigniter library for using the Klout API. You can follow this project, as well as submit issues as you find them using Bitbucket: http://bitbucket.org/brandonbeasley/bb_klout
The Klout API library was developed on the Codeigniter 2.0 framework which can be downloaded here.
Getting Started
Load the library using you Klout API key which you can get here.
$this->load->library('klout', array(
'api_key' => 'hratam3aswnmdkd35vvaz9ka'
));
Score Method
http://api.klout.com/1/klout.xml?key=[your_api_key]&users=[usernames]
This method allows you to retrieve a Klout score in XML or JSON.
Where “[usernames]” is a comma-delimited string of URL escaped usernames.
$this->klout->get('klout', array('users' => 'tbrandonbeasley'), 'json');
User Method
http://api.klout.com/1/users/show.[xml_or_json]?key=[your_api_key]&users=[usernames]
Where “[usernames]” is a comma-delimited string of URL escaped usernames.
$this->klout->get('klout', array('users' => 'tbrandonbeasley,sourcewerks,x2yme'), 'json');
Relationship Method
http://api.klout.com/1/soi/influenced_by.[xml_or_json]?key=[your_api_key]&users=[users]
This method allows you to retrieve up to 25 user score pairs (see Response Formats) for users that are influenced by the given influencer in XML or JSON.
Where “[users]” is a comma-delimited string of URL escaped usernames.
$this->klout->get('soi/influenced_by', array('users' => 'tbrandonbeasley'), 'json');
Topic Method
http://api.klout.com/1/topics/search.[xml_or_json]?key=[your_api_key]&topic=[topic]
This method allows you to retrieve 25 influencers as user objects for a given topic in XML or JSON. To ensure expected results from our ontology, it is recommended to verify the topic prior to using this method.
Where “[topic]” is a valid URL escaped topic.
$this->klout->get('topics/search', array('topic' => 'seo'), 'json');
You must be registered to post comments Register Here!
Need Help? Hire Me
Twitter
Recent Comments
- dswabster on Netbeans Dark Color Theme
- Adwords Api Php – BrandonBeasley.com » Blog Archive » Twitter Weekly Updates for … on Twitter Weekly Updates for 2010-09-26
- BrandonBeasley.com » Blog Archive » Twitter Weekly Updates for 2010-09-26 on Twitter API Library for Codeigniter: Proof of Concept
- BrandonBeasley.com » Blog Archive » Twitter Weekly Updates for 2010-09-26 on Facebook API: php-sdk using Codeigniter
- BrandonBeasley.com » Blog Archive » Twitter Weekly Updates for 2010-09-26 on Netbeans Dark Color Theme







