Skip to content

requestUserCredentials(presentationContextProvider_callbackURL_with_)

daneden edited this page Jan 19, 2022 · 2 revisions

requestUserCredentials(presentationContextProvider:callbackURL:with:)

Request user credentials by presenting Twitter's web-based authentication flow

public func requestUserCredentials(
    presentationContextProvider: ASWebAuthenticationPresentationContextProviding? = nil,
    callbackURL: URL,
    with completion: @escaping ((userCredentials: OAuthCredentials?, error: Error?)) -> Void
  )

Parameters

  • presentationContextProvider: Optional presentation context provider. When not provided, this function will handle the presentation context itself.
  • callbackURL: The callback URL as configured in your Twitter application settings
  • completion: A callback that allows the caller to handle subsequent user credentials or errors. Callers are responsible for storing the user credentials for later use.
Types
Global Variables
Global Functions
Extensions
Clone this wiki locally