[英]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: 我做了一些探索,发现了以下几点,这是我到目前为止所做的:
Implemented custom URL, like myApp://
实现自定义URL,例如
myApp://
Added FacebookAppID, display name to my info.plist file 添加了FacebookAppID,显示我的info.plist文件的名称
Included the Facebook SDK 包含Facebook SDK
Created Facebook app link through Facebook mobile hosting API and got the URL something like: https://fb.me/1601524146753610 通过Facebook移动主机API创建Facebook应用程序链接,并获得如下URL:https://fb.me/1601524146753610
Used the above URL as deep link while creating app-install Ads. 在创建应用安装广告时,将上述网址用作深层链接。
Implemented the below function in my AppDelegate.m 在我的AppDelegate.m中实现了以下功能
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
Added the below code in my AppDelegate.m 在我的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 . 另外, 在将iOS APP发布到appStore之前 , 如何测试相同内容 。
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. 我已经报告了相同的facebook支持,他们说上面提到的步骤是正确的,以实现延迟深层链接功能。
Also, the same can be tested as follows: 此外,可以测试如下:
Visit https://developers.facebook.com/tools/app-ads-helper 访问https://developers.facebook.com/tools/app-ads-helper
Select your app and hit 'Submit'. 选择您的应用并点击“提交”。
At the bottom you will find 'Deep Link Tester' under Developer Tools. 在底部,您将在Developer Tools下找到“Deep Link Tester”。 Hit 'Test Deep Link' and in the dialog you can enter your deep link to test.
点击“测试深层链接”,然后在对话框中输入您的深层链接进行测试。
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.
您将在其中测试此设备的设备应安装Facebook应用程序并使用您从app-ads帮助程序发送“延迟深层链接请求”的帐户登录。
Now when you open your app, you should bee able to see your deferred deep link functionality working. 现在,当您打开应用程序时,您应该能够看到延迟的深层链接功能正常工作。
The above steps worked for me. 以上步骤对我有用。
Select both 'Send Notification' and 'Send Deferred' check marks. 选择“发送通知”和“发送延迟”复选标记。
Then you will get a notification to your facebook app. 然后你会收到你的Facebook应用程序的通知。
8.Add bellow keys to your info.plist 8.将波纹管键添加到info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>**Your URL Scheme** </string>
<string>**Your FB app id** </string>
</array>
</dict>
</array>
URL scheme Like " testScheme ://......."
URL方案像“ testScheme :// .......”
FB app id Like " fb......... "
FB app id喜欢“ fb ......... ”
Now we can test 2 cases. 现在我们可以测试2个案例。
app already install in your device with deferred link implementation 应用程序已安装在您的设备中,延期链接实施
New install 新安装
for 1st case, install your app and then click facebook notification, it is redirected to your app. 对于第一种情况,安装您的应用程序,然后单击Facebook通知,它被重定向到您的应用程序。
for 2nd case, For new installs 对于第二种情况, 对于新安装
Uninstall your app and Connect your device to xcode 卸载您的应用并将您的设备连接到xcode
Then click deeplink facebook notification, it is redirected to appstore, don't install from appstore because your published app doesn't have app deep link implementation 然后点击deeplink facebook通知,它被重定向到appstore,不要从appstore安装,因为你发布的应用没有app深层链接实现
Then you can run app from xcode, once it is installed, it is open your deeplink as 1st case. 然后你可以从xcode运行应用程序,一旦安装它,它将打开你的深层链接作为第一种情况。
Thats it.... 而已....
Note: don't forgot to implement 注意:别忘了执行
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url,NSError *error){
if(url)
{
// redirect to where you want
}
}];
...........
}
Additional info: 附加信息:
So you need to deploy the app to the store?
那么你需要将应用程序部署到商店吗? – locoboy Aug 7 '15 at 16:38
- locoboy 2015年8月7日16:38
For testing Deep Link or Deferred Deep Link as they said before me: 用于测试Deep Link或Deferred Deep Link,正如他们在我之前所说:
activateApp
) activateApp
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.