简体   繁体   English

Facebook 延迟深度链接在 iOS 上是否有效,以及如何在应用商店发布应用之前对其进行测试?

[英]Does Facebook Deferred Deep Linking on iOS work, and how to test it before publishing the app on Store?

I have a problem with Facebook Deferred Deep Linking on iOS.我在 iOS 上使用 Facebook 延迟深度链接时遇到问题。 DEEP LINKING WORKS, BUT DEFERRED DEEP LINKING DOESN'T WORK.深度链接有效,但延迟深度链接不起作用。 I have read a lot about this problem and still cannot find the solution.我已经阅读了很多关于这个问题的信息,但仍然找不到解决方案。

I have set up deep linking and it works.我已经设置了深层链接并且它有效。 When I also try to test deep linking on App Ads Helper and click on "Test deep link", enter deep link and click on "Send notification", I receive a notification on Facebook which opens my app, and this deep linking works.当我还尝试在App Ads Helper上测试深层链接并单击“测试深层链接”,输入深层链接并单击“发送通知”时,我在 Facebook 上收到一条通知,该通知打开了我的应用程序,并且此深层链接有效。 But, when I click "Select Deferred", I don't receive anything.但是,当我单击“选择延迟”时,我什么也没收到。 I try to delete app and reinstall it, but [FBSDKAppLinkUtility fetchDeferredAppLink:...];我尝试删除应用程序并重新安装它,但是[FBSDKAppLinkUtility fetchDeferredAppLink:...]; method doesn't get any deferred deep link after new install.新安装后,方法不会获得任何延迟的深层链接。

[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {
        if (error) {
            NSLog(@"Received error while fetching deferred app link %@", error);
        }
        if (url) {
            [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {

            }];
        }
    }];

In this example, url is always nil.在这个例子中,url 始终为零。

Note: I still don't have app on Store, so I entered a Apple Id of another application.注意:我在 Store 上还没有应用程序,所以我输入了另一个应用程序的 Apple Id。 Even if I had my own app on Store, how could I test deferred deep linking without publishing app on Store?即使我在 Store 上有自己的应用程序,我如何在不在 Store 上发布应用程序的情况下测试延迟深度链接?

Also, I have read on Facebook documentation that:另外,我在 Facebook 文档中阅读了以下内容:

Beginning with iOS 10, iOS doesn't support deferred deep linking, so you can't open content other than the starting screen once people have installed the app.从 iOS 10 开始,iOS 不支持延迟深度链接,因此一旦人们安装了该应用程序,您将无法打开除起始屏幕之外的内容。 ( Source ) 来源

So, I am not sure if this is even possible.所以,我不确定这是否可能。

Also, I have read another articles on Stackoverflow, but there are not answer that I am looking for, ie they look incomplete, or I just don;t see the answer between the lines:另外,我已经阅读了关于 Stackoverflow 的另一篇文章,但没有我正在寻找的答案,即它们看起来不完整,或者我只是看不到字里行间的答案:

How to use facebook deferred deep linking feature for new installs and to test the same before publishing iOS App to appStore? 如何使用 Facebook 延迟深度链接功能进行新安装并在将 iOS 应用程序发布到 appStore 之前对其进行测试? -> Answers to this question aren't what I am looking for: -> 这个问题的答案不是我要找的:

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.您将在其中进行测试的设备应该安装了 facebook 应用程序,并使用您从 app-ads 助手发送“延迟深层链接请求”的帐户登录。 Now when you open your app, you should bee able to see your deferred deep link functionality working.现在,当您打开应用程序时,您应该能够看到延迟深层链接功能正在运行。

This doesn't work, so that's why I am asking this question.这不起作用,所以这就是我问这个问题的原因。

Also, I have found that I could use Tune SDK for deferred deep linking:此外,我发现我可以使用 Tune SDK 进行延迟深度链接:

...this is not a problem with the iOS 10 operating system itself. ...这不是 iOS 10 操作系统本身的问题。 Deferred deep linking works just fine for iOS 10 using the TUNE SDK.延迟深度链接对于使用 TUNE SDK 的 iOS 10 来说效果很好。 ( Source ) 来源

Also, I have found that I could use Branch.io for deferred deep linking:此外,我发现我可以使用 Branch.io 进行延迟深度链接:

With Branch, you get all the basic routing of a Universal Link plus the deferred deep linking and install attribution for the new user acquisition flow.使用 Branch,您可以获得通用链接的所有基本路由以及新用户获取流程的延迟深度链接和安装归因。 ( Source ) 来源

I haven't tried Tune and Branch.io.我还没有尝试过 Tune 和 Branch.io。 I would like to use Facebook ads and perform deferred deep linking without third party solutions.我想使用 Facebook 广告并在没有第三方解决方案的情况下执行延迟深度链接。 Is it possible with Facebook, and how to test deferred deep linking for Facebook on iOS? Facebook 是否有可能,以及如何在 iOS 上测试 Facebook 的延迟深度链接?

It worked for us after resetting advertising identifier.重置广告标识符后,它对我们有用。 Maybe internally they are preventing attribution in the same app twice if it is the same advertising identifier.也许在内部,如果它是相同的广告标识符,他们会在同一个应用程序中两次阻止归因。 So go to settings and reset your advertising identifier before testing.因此,在测试之前,请转到设置并重置您的广告标识符。 Also make sure the phone has not opted out of tracking.还要确保手机没有选择退出跟踪。

For me, the answer was in my iPhone settings.对我来说,答案就在我的 iPhone 设置中。 I had "Limit Ad Tracking" enabled.我启用了“限制广告跟踪”。 I don't have much documentation proof that this was causing the issue but after changing it, it is now working.我没有太多文档证明这是导致问题的原因,但是在更改它之后,它现在可以工作了。 It's worth testing it yourself.值得自己测试一下。

On your iPhone go to: Settings -> Privacy -> Advertising (at the bottom of the page)在您的 iPhone 上:设置 -> 隐私 -> 广告(在页面底部)

There you should ensure that "Limit Ad Tracking" is set to off.在那里您应该确保“限制广告跟踪”设置为关闭。

You should then recieve a URL if you have your app URL Scheme correctly set (see here if not) code which for swift should look like this:如果您正确设置了应用程序 URL Scheme(如果没有,请参阅此处),您应该会收到一个 URL,对于 swift 代码应该如下所示:

AppLinkUtility.fetchDeferredAppLink { [weak self] (url, error) in
        guard let self = self else {return}
        if (url != nil) {
            
        } else if error != nil {
            print("Error: \(error!.localizedDescription)")
        }
}

To test the deferred links, you can go here .要测试延迟链接,您可以去这里

A bit late, but per your comment on the previous answer: Once you receive the message:有点晚了,但根据您对上一个答案的评论:收到消息后:

The link has been queued and is pending you doing a first app launch on your device.该链接已排队等待您在您的设备上启动第一个应用程序。 This means you need to delete the app, then re-install and open your app.这意味着您需要删除该应用程序,然后重新安装并打开您的应用程序。 Please first verify your app can handle deferred deep linking by checking the iOS and Android setup information located above.请首先通过检查上面的 iOS 和 Android 设置信息来验证您的应用程序可以处理延迟的深层链接。

  1. Delete the application from your device从您的设备中删除应用程序
  2. Open Facebook notifications from your device, you should have a deeplink notification从您的设备打开 Facebook 通知,您应该有一个深层链接通知
  3. Selecting the deeplink notification should direct you to the appropriate app store to install the application again选择深层链接通知应将您引导至相应的应用商店以再次安装该应用程序
  4. Once installed, launching the application should trigger the intended 'Deferred' deep link安装后,启动应用程序应触发预期的“延迟”深层链接

For deferred deep link to work, you also need to be logged in on the Facebook app.要使延迟深层链接起作用,您还需要登录 Facebook 应用程序。 The ads helper tool: https://developers.facebook.com/tools/app-ads-helper/ knows your logged in user id on facebook.com.广告助手工具: https : //developers.facebook.com/tools/app-ads-helper/知道您在 facebook.com 上的登录用户 ID。 Facebook then uses this info to match your id, the app and the device information and returns an appLink back to your app if so. Facebook 然后使用此信息来匹配您的 ID、应用程序和设备信息,并在匹配时将 appLink 返回给您的应用程序。

Unfortunately, that's not possible on simulator given the limitation to install other apps like Facebook.不幸的是,鉴于安装 Facebook 等其他应用程序的限制,这在模拟器上是不可能的。

Your only option is to use a real device and build your XCode project on it.您唯一的选择是使用真实设备并在其上构建您的 XCode 项目。 Make sure you have Facebook installed and that you are logged in with the same user as on your desktop web browser.确保您已安装 Facebook,并且您使用与桌面 Web 浏览器相同的用户登录。

If you are running Facebook ads with Deep linking enabled, you can test deferred deep linking setup here: https://developers.facebook.com/tools/app-ads-helper/如果您在启用深度链接的情况下运行 Facebook 广告,您可以在此处测试延迟的深度链接设置: https : //developers.facebook.com/tools/app-ads-helper/

You will need to select your app, then you should be able to access the deep-link tester at the bottom of the page (in which you can also select deferred )您需要选择您的应用程序,然后您应该能够访问页面底部的深层链接测试器(您也可以在其中选择deferred

在此处输入图片说明

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,就像他们在我之前所说的那样:

  • deploy to store not required, use FB Ads panel for testing部署到商店不需要,使用FB Ads面板进行测试
  • check just in case statistic for app installs (not equal zero) - may be AppEvents (automatically logged) doesn't work correct (keep in mind, in the calculation of statistics, there may also be a delay)检查以防万一应用安装统计(不等于零) - 可能是AppEvents (自动记录)工作不正确(请记住,在计算统计数据时,也可能会有延迟)
  • Install Facebook application for your device, auth in using the same profile that you use to send notifications (run FB app in background)为您的设备安装 Facebook 应用程序,使用您用于发送通知的相同配置文件进行身份验证(在后台运行 FB 应用程序)
  • Select both 'Send Notification' and 'Send Deferred' check marks (or check only 'Send Deferred' - results will available after manual app reinstall, and don't forgot trigger FBSDKAppEvents activateApp )选择“发送通知”和“发送延迟”复选标记(或只选中“发送延迟” - 结果将在手动重新安装应用程序后可用,并且不要忘记触发 FBSDKAppEvents activateApp
  • Example after successful sending发送成功后的示例
  • The main objective - after sending the message you will see it in Facebook!主要目标 - 发送消息后,您将在 Facebook 中看到它! app notifications, with logo + text "Tap to launch your deep link"应用通知,带有徽标 + 文字“点击以启动您的深层链接”
  • Tap on notification点按通知

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM