Janrain: User management platform for the social web

<JREngageDelegate> Protocol Reference

Protocol adopted by an object that wishes to receive notifications when and information about a user that authenticates with your application and publishes activities to their social networks. More...

#import <JREngage.h>

List of all members.

Public Member Functions

Configuration

Messages sent by JREngage during dialog launch/configuration

(void) - jrEngageDialogDidFailToShowWithError:
Authentication

Messages sent by JREngage during authentication

(void) - jrAuthenticationDidNotComplete
(void) - jrAuthenticationDidSucceedForUser:forProvider:
(void) - jrAuthenticationDidFailWithError:forProvider:
(void) - jrAuthenticationDidReachTokenUrl:withResponse:andPayload:forProvider:
(void) - jrAuthenticationCallToTokenUrl:didFailWithError:forProvider:
SocialPublishing

Messages sent by JREngage during social publishing

(void) - jrSocialDidNotCompletePublishing
(void) - jrSocialDidCompletePublishing
(void) - jrSocialDidPublishActivity:forProvider:
(void) - jrSocialPublishingActivity:didFailWithError:forProvider:

Detailed Description

Protocol adopted by an object that wishes to receive notifications when and information about a user that authenticates with your application and publishes activities to their social networks.

This protocol will notify the delegate(s) when authentication and social publishing succeed or fail, it will provide the delegate(s) with the authenticated user's profile data, and, if server-side authentication is desired, it can provide the delegate(s) with the data payload returned by your server's token URL.


Member Function Documentation

- (void) jrEngageDialogDidFailToShowWithError: (NSError *)  error  

Sent if the application tries to show a JREngage dialog, and JREngage failed to show. May occur if the JREngage library failed to configure, or if the activity object was nil, etc.

Parameters:
error The error that occurred during configuration
Note:
This message is only sent if your application tries to show a JREngage dialog, and not necessarily when an error occurs, if, say, the error occurred during the library's configuration. The raison d'etre is based on the possibility that your application may preemptively configure JREngage, but never actually use it. If that is the case, then you won't get any error.
- (void) jrAuthenticationDidNotComplete  

Sent if the authentication was canceled for any reason other than an error. For example, the user hits the "Cancel" button, any class (e.g., the JREngage delegate) calls the cancelAuthentication message, or if configuration of the library is taking more than about 16 seconds (rare) to download.

- (void) jrAuthenticationDidSucceedForUser: (NSDictionary *)  auth_info
forProvider: (NSString *)  provider 

Tells the delegate that the user has successfully authenticated with the given provider, passing to the delegate an NSDictionary object with the user's profile data.

Parameters:
auth_info An NSDictionary of fields containing all the information Janrain Engage knows about the user logging into your application. Includes the field "profile" which contains the user's profile information
provider The name of the provider on which the user authenticated. For a list of possible strings, please see the List of Providers
Example:
The structure of the auth_info dictionary (represented here in json) should look something like the following:
 "auth_info":
 {
 "profile":
 {
 "displayName": "brian",
 "preferredUsername": "brian",
 "url": "http:\/\/brian.myopenid.com\/",
 "providerName": "Other",
 "identifier": "http:\/\/brian.myopenid.com\/"
 }
 }
See also:
For a full description of the dictionary and its fields, please see the auth_info response section of the Janrain Engage API documentation.
- (void) jrAuthenticationDidFailWithError: (NSError *)  error
forProvider: (NSString *)  provider 

Sent when authentication failed and could not be recovered by the library.

Parameters:
error The error that occurred during authentication
provider The name of the provider on which the user tried to authenticate. For a list of possible strings, please see the List of Providers
Note:
This message is not sent if authentication was canceled. To be notified of a canceled authentication, see jrAuthenticationDidNotComplete.
- (void) jrAuthenticationDidReachTokenUrl: (NSString *)  tokenUrl
withResponse: (NSURLResponse *)  response
andPayload: (NSData *)  tokenUrlPayload
forProvider: (NSString *)  provider 

Sent after JREngage has successfully posted the token to your application's token_url, containing the headers and body of the response from the server.

Parameters:
tokenUrl The URL on the server where the token was posted and server-side authentication was completed
response The final NSURLResponse returned from the server
tokenUrlPayload The response from the server
provider The name of the provider on which the user authenticated. For a list of possible strings, please see the List of Providers
- (void) jrAuthenticationCallToTokenUrl: (NSString *)  tokenUrl
didFailWithError: (NSError *)  error
forProvider: (NSString *)  provider 

Sent when the call to the token URL has failed.

Parameters:
tokenUrl The URL on the server where the token was posted and server-side authentication was completed
error The error that occurred during server-side authentication
provider The name of the provider on which the user authenticated. For a list of possible strings, please see the List of Providers
- (void) jrSocialDidNotCompletePublishing  

Sent if social publishing was canceled for any reason other than an error. For example, the user hits the "Cancel" button, any class (e.g., the JREngage delegate) calls the cancelPublishing message, or if configuration of the library is taking more than about 16 seconds (rare) to download.

- (void) jrSocialDidCompletePublishing  

Sent after the social publishing dialog is closed (e.g., the user hits the "Close" button) and publishing is complete. You can receive multiple jrSocialDidPublishActivity:forProvider: messages before the dialog is closed and publishing is complete.

- (void) jrSocialDidPublishActivity: (JRActivityObject *)  activity
forProvider: (NSString *)  provider 

Sent after the user successfully shares an activity on the given provider.

Parameters:
activity The shared activity
provider The name of the provider on which the user published the activity. For a list of possible strings, please see the List of Social Providers
- (void) jrSocialPublishingActivity: (JRActivityObject *)  activity
didFailWithError: (NSError *)  error
forProvider: (NSString *)  provider 

Sent when publishing an activity failed and could not be recovered by the library.

Parameters:
activity The activity the user was trying to share
error The error that occurred during publishing
provider The name of the provider on which the user attempted to publish the activity. For a list of possible strings, please see the List of Social Providers

The documentation for this protocol was generated from the following file:
  • /Users/lillialexis/iPhone/engage.iphone/JREngage/classes/JREngage.h
Copyright © 2017 Janrain, Inc.