FacebookSignInHandler

public class FacebookSignInHandler : NSObject, IdPHandler

FacebookSignInHandler is responsible to perform sign-in and authorize a user using Facebook account

Properties

  • Credentials type for Facebook credentials

    Declaration

    Swift

    public var tokenType: String
  • Currently presented UIViewController in the application which will be used to present Facebook login view

    Declaration

    Swift

    public var presentingViewController: UIViewController?

Init

  • Declaration

    Swift

    public override init()

Protocol

  • Signs-in a user through FacebookLogin SDK

    Declaration

    Swift

    public func signIn(idpClient: IdPClient, completion: @escaping SocialLoginCompletionCallback)

    Parameters

    idpClient

    IdPClient information

    completion

    Completion callback to notify the result

  • Generates, and returns UIView for FBLoginButton button

    Declaration

    Swift

    public func getProviderButtonView() -> UIView?

    Return Value

    FBLoginButton button in UIView

  • Generates, and returns UIView for FBLoginButton button with ColorStyle option

    Declaration

    Swift

    public func getFacebookButtonView(colorStyle: FBTooltipView.ColorStyle = .neutralGray) -> UIView?

    Parameters

    colorStyle

    FBTooltipView.ColorStyle option for FBLoginButton; default value with .neutralGray

    Return Value

    FBLoginButton button in UIView

  • Call this method from the UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:) method of your application delegate. It should be invoked for the proper use of the Facebook SDK. As part of SDK initialization, basic auto-logging of app events will occur; this can be controlled via the FacebookAutoLogAppEventsEnabled key in the project’s Info.plist file.

    Declaration

    Swift

    public static func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool

    Parameters

    application

    The application as passed to UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:).

    launchOptions

    The launch options as passed to UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:).

    Return Value

    true if there are any added application observers that themselves return true from calling application(_:didFinishLaunchingWithOptions:). Otherwise will return false.