Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple SDK for KloutPass (Klout OAuth API)

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 Resources
Octocat-spinner-32 klout-ios-sdk.xcodeproj
Octocat-spinner-32 klout-ios-sdk
Octocat-spinner-32 klout-ios-sdkTests
Octocat-spinner-32 .gitignore


Simple SDK for KloutPass

Using starter example

  • git clone
  • git clone
  • open klout-ios-starter/klout-ios-starter.xcodeproj
  • You may have to build first before running.

Creating your own

  • Create Xcode project
  • From Finder, drag klout-ios-sdk.xcodeproj into your Xcode project
  • In Build Phases/Target Dependencies, add klout-ios-sdk
  • In Build Phases/Link Binary With Libraries, add klout-ios-sdk
  • In Build Settings/Header Search Paths, add $BUILT_PRODUCTS_DIR
  • If you would like to use the KloutPassButton and would like a cooler looking cancel button for the webview, drag Resources from klout-ios-sdk into your app.



-(id) initWithSuperView:(UIView*)superview 
           withDelegate:(id <KloutPassAdapterDelegate>)delegate;

Initialize the adapter with a superview that will encompass the oauth webview, a delegate that will handle callbacks (see next section), your api key, secret, and redirect.

-(void) login;

Begin the login process. Will show webview.

-(BOOL) isLoggedIn;

Check if the adapter is in the logged in state.

-(void) logout;

Logout the current session.

- (void) requestUser;

When logged in, will request a user payload for the current logged in user.


- (void) completedLogin;

Finished login.

- (void) completedUserFetch:(NSString*)userPayload;

Finished user fetch for current user.

- (void) error:(KloutPassError*)theError;

An error occured. See below for KloutPassError documentation.


- (NSString*) errorMessage;

Get the error message

- (NSString*) errorCode;

Get the error code. Code can take on the following values:

  • error.connection - Connection error
  • error.login.not - Not logged in (when making fetchUserPayload call)
  • error.login.already - Already logged in (when making login call)
  • error.user-request.already - Already making user request
  • error.token-request.already - Already making token request
  • error.unknown - Unknown error
- (NSString*) apiKey;

Return the api key for your app

- (NSString*) apiSecret;

Return the secret for your app

- (NSString*) redirect;

Return the redirect for your app


This is a login button you can just drop in Interface Builder. The asset size is 274x49. It would behoove you to adhere to that ratio.

  • Use a typical UIButton, but change the class to KloutPassButton
  • If you're using InterfaceBuilder, call [KloutPassButton version]; somewhere in your app
  • Set the delegate for the button, either via the outlet in InterfaceBuilder or in code.
Something went wrong with that request. Please try again.