Integration with Klout - Salesforce

Salesforce Feb 28, 2015

There can be lot of scenarios where in you want social influence of a person to be captured and displayed to enhance customer experience on your website/portal. There are lot of applications/platforms out in market that can be used to get this. All applications have different criteria to calculate social score. In this blog, we will discuss about Klout.

Background about Klout:
Klout

Klout is a website and mobile app that uses social media analytics to rank its users according to online social influence via the "Klout Score", which is a numerical value between 1 and 100.

Klout uses Twitter, Facebook, Google+, LinkedIn, Foursquare, Wikipedia, and Instagram data to create Klout user profiles that are assigned a unique "Klout Score".

Please go to this wiki link to know more about it.

How to integrate with Salesforce with Klout?

Klout have exposed their APIs and using them we can get users' information from it. Whole integration works on Klout Id, Klout Id corresponds to user Id in klout system. Using this klout id , we can get user's information. To get this Klout Id, we have to send twitter user name to get it corresponding one.
I have created a force.com package that has a handler and a setup object for this integration.

Prerequisites:

  1. Create an Account at klout.
  2. Deploy wrapper class into your salesforce org.
  3. Go to custom settings || Klout Setup
  4. Add Klout API key & Klout Url to corresponding fields

There are various methods in handler that will give either one of following or all of them:

  1. Klout User's Details
  2. User's Score
  3. User's Topics
  4. User's Influence

Note:

  1. Package is made to interact with Klout API V2.
    2.You just need to pass twitter username to methods to get users information from klout. Use 'getEverything' method to get everything about user or use single methods for specific information

Also, You can test Klout APIs with their Interaction Console, that can help in understanding their responses

Related Tags:

Salesforce