Latest 0.1.3
Homepage https://github.com/mexiQQ/OAuthSignUtil
License MIT
Platforms ios 6.0, requires ARC
Dependencies STHTTPRequest
Authors

OAuthSignUtil

Github Google Sina QQ OAuth Sign

Install

Cocoapod

platform:'ios','7.0'
pod 'MXOAuthSignUtil', '~> 0.1.2'

Without Cocoapod

just like the Demo

Dependencies

  • STHTTPRequest ~1.0.2

Use

  1. find the OAuthSianUtil.h and add ID,secret for 4 platforms

    //github
    #define kGithubClientID @""
    #define kGithubClientSecret @""
    #define kGithubRedirectUrl @""
    
    //google
    #define KGoogleClientID @""
    #define kGoogleClientSecret @""
    #define kGoogleRedirectUrl @""
    
    //QQ
    #define KQQClientID @""
    #define kQQClientSecret @""
    #define kQQRedirectUrl @""
    
    //sina
    #define KSinaClientID @""
    #define KSinaClientSecret @""
    #define KSinaRedirectUrl @""
  2. viewController.h:

    #import <UIKit/UIKit.h>
    #import "OAuthSignUtil.h"
    
    @interface ViewController : UIViewController<OAuthSignUtilDelegate>
    
    @end
  3. viewController.m:

      //callback
      - (void)didFinishOAuthSign:(NSString *)type accessToken:(NSString *) accessToken{
          NSLog(@"type is %@ accessToken =%@",type,accessToken);
      }
    
      //OAuth
      - (IBAction)loginAction:(id)sender  {
          [[OAuthSignUtil sharedOAuthSignUtil] signInto:SignIntoSina viewController:self ];
          [OAuthSignUtil sharedOAuthSignUtil].oAuthDelegate = self;
      }
  4. Enum:SignIntoSina,SignIntoGithub,SignIntoGoogle,SignIntoQQ

License

MIT

`

Latest podspec

{
    "name": "MXOAuthSignUtil",
    "version": "0.1.3",
    "summary": "Github google Sina QQ four platform OAuth",
    "homepage": "https://github.com/mexiQQ/OAuthSignUtil",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "mexiqq": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mexiQQ/OAuthSignUtil.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": [
        "OAuthSignClass",
        "OAuthSignClass/*.{h,m}"
    ],
    "resources": [
        "OAuthSignClass",
        "OAuthSignClass/*.xib"
    ],
    "requires_arc": true,
    "dependencies": {
        "STHTTPRequest": [
            "~> 1.0.2"
        ]
    }
}

Pin It on Pinterest

Share This