iOS SDK Version

FBSDKURL

@interfaceFBSDKURL:NSObject
Provides a set of utilities for working with NSURLs, such as parsing of query parameters and handling for App Link requests.
  • Unavailable
    Undocumented

    Declaration

    Objective-C
    -(instancetype)initNS_UNAVAILABLE;
  • Unavailable
    Undocumented

    Declaration

    Objective-C
    +(instancetype)newNS_UNAVAILABLE;
  • Creates a link target from a raw URL. On success, this posts the FBSDKAppLinkParseEventName measurement event. If you are constructing the FBSDKURL within your application delegate’s application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: to support better FBSDKMeasurementEvent notifications

    Declaration

    Objective-C
    +(nonnullinstancetype)URLWithURL:(nonnullNSURL*)url;
    Swift
    convenienceinit(url:URL)

    Parameters

    url
    The instance of NSURL to create FBSDKURL from.
  • Creates a link target from a raw URL received from an external application. This is typically called from the app delegate’s application:openURL:sourceApplication:annotation: and will post the FBSDKAppLinkNavigateInEventName measurement event.

    Declaration

    Objective-C
    +(nonnullinstancetype)URLWithInboundURL:(nonnullNSURL*)urlsourceApplication:(nonnullNSString*)sourceApplication;
    Swift
    convenienceinit(inboundURLurl:URL,sourceApplication:String)

    Parameters

    url
    The instance of NSURL to create FBSDKURL from.
    sourceApplication
    the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation:
  • Gets the target URL. If the link is an App Link, this is the target of the App Link. Otherwise, it is the url that created the target.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly)NSURL*_NonnulltargetURL;
    Swift
    vartargetURL:URL{get}
  • Gets the query parameters for the target, parsed into an NSDictionary.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly)NSDictionary<NSString*,id>*_NonnulltargetQueryParameters;
    Swift
    vartargetQueryParameters:[String:Any]{get}
  • If this link target is an App Link, this is the data found in al_applink_data. Otherwise, it is nil.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly,nullable)NSDictionary<NSString*,id>*appLinkData;
    Swift
    varappLinkData:[String:Any]?{get}
  • If this link target is an App Link, this is the data found in extras.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly,nullable)NSDictionary<NSString*,id>*appLinkExtras;
    Swift
    varappLinkExtras:[String:Any]?{get}
  • The App Link indicating how to navigate back to the referer app, if any.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly,nullable)FBSDKAppLink*appLinkReferer;
    Swift
    varappLinkReferer:FBSDKAppLink?{get}
  • The URL that was used to create this FBSDKURL.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly)NSURL*_NonnullinputURL;
    Swift
    varinputURL:URL{get}
  • The query parameters of the inputURL, parsed into an NSDictionary.

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly)NSDictionary<NSString*,id>*_NonnullinputQueryParameters;
    Swift
    varinputQueryParameters:[String:Any]{get}
  • The flag indicating whether the URL comes from auto app link

    Declaration

    Objective-C
    @property(nonatomic,readonly,getter=isAutoAppLink)BOOLisAutoAppLink;
    Swift
    varisAutoAppLink:Bool{get}