Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
445 views
in Technique[技术] by (71.8m points)

objective c - How to use Facebook deferred deep linking feature for new installs and to test the same before publishing iOS App to appStore?

I have done some exploration and have found the following things, this is what I have done so far:

  1. Implemented custom URL, like myApp://

  2. Added FacebookAppID, display name to my info.plist file

  3. Included the Facebook SDK

  4. Created Facebook app link through Facebook mobile hosting API and got the URL something like: https://fb.me/1601524146753610

  5. Used the above URL as deep link while creating app-install Ads.

  6. Implemented the below function in my AppDelegate.m

     - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
    
  7. Added the below code in my AppDelegate.m

    //Initialization
    [FBAppEvents activateApp];
    [FBSettings setClientToken:@"ca45a3a2133ae2f37ebd4d90408816e6"];
    
    //Function to check for deferred deep link and call the method with recieved url
    [FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url,NSError *error){
    if(url)
    [self application:nil openURL:url sourceApplication:nil annotation:nil];
    }];
    

    Please let me know if i have missed something in fetching deferred deep link.
    Also, how can I test the same before publishing my iOS APP to appStore.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had reported the same facebook support and they said that above mentioned steps were correct in order to implement the deferred deep link functionality.

Also, the same can be tested as follows:

  1. Visit https://developers.facebook.com/tools/app-ads-helper

  2. Select your app and hit 'Submit'.

  3. At the bottom you will find 'Deep Link Tester' under Developer Tools. Hit 'Test Deep Link' and in the dialog you can enter your deep link to test.

  4. If you want to verify deferred links then check 'Send Deferred' in the dialog.

So, after doing this you need to uninstall the app(if already present) and then install again from the app store. The device in which you will be testing this should have facebook app installed and logged in with the account from which you had sent the "deferred deep link request" from app-ads helper.

Now when you open your app, you should bee able to see your deferred deep link functionality working.

The above steps worked for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...