SIDLinkedin
@interface SIDLinkedin : NSObject <SIDProvider>
SIDLinkedin
-
Undocumented
Declaration
Objective-C
@property NSString *callbackUrl
-
Undocumented
Declaration
Objective-C
@property NSString *consumerKey
-
Undocumented
Declaration
Objective-C
@property NSString *consumerSecret
-
Undocumented
Declaration
Objective-C
@property UIWebView *webView
-
Undocumented
Declaration
Objective-C
@property NSString *fields
-
Undocumented
Declaration
Objective-C
@property NSString *state
-
Undocumented
Declaration
Objective-C
@property NSArray *scopes
-
Undocumented
Declaration
Objective-C
@property (copy, nonatomic) void (^success
-
Undocumented
Declaration
Objective-C
@property (copy, nonatomic) void (^failure
-
Get singleton instance.
Declaration
Objective-C
+ (instancetype)sharedInstance;
-
Initializes the LinkedIn login and registers the provider in the SIDLogin.
Declaration
Objective-C
+ (void)initializeLinkedin;
-
Set the webview where the login flow will be performed.
Declaration
Objective-C
+ (void)setWebView:(id)webview;
Parameters
webview
The webview.
-
Set LinkedIn scopes.
Declaration
Objective-C
+ (void)setScopes:(NSArray *)scopes;
Parameters
permissions
An array of LinkedIn scopes.
-
Execute failure callback.
Declaration
Objective-C
- (void)callFailure:(NSString *)message;
Parameters
message
Failure message.
-
Performs the LinkedIn login flow in the configured webview, returning the generated SIDUser or error.
Declaration
Objective-C
- (void)logInWithFields:(NSString *)fields success:(void (^)(SIDUser *))success failure:(void (^)(NSError *))failure;
Parameters
fields
The user fields to be retrieved.
success
The callback in case of success. A SIDUser object is provided including the specified fields.
failure
The callback in case of failure. A NSError object is provided.
-
Create a SIDToken object given a LinkedIn access token.
Declaration
Objective-C
- (void)createTokenFromAccessToken:(NSString *)accessToken success:(void (^)(SIDToken *))success failure:(void (^)(NSError *))failure;
Parameters
accessToken
A LinkedIn access token.
success
The callback in case of success. A SIDToken object is provided.
failure
The callback in case of failure. A NSError object is provided.
-
Get LinkedIn access token given an authorization code. It also generates a SocialID Token and gets the user, executing the callbacks defined by logInWithFields:success:failure.
Declaration
Objective-C
- (void)requestForAccessToken:(NSString *)authorizationCode state:(NSString *)state;
Parameters
authorizationCode
LinkedIn authorization code.
staet
LinkedIn state.