gpt4 book ai didi

ios - 如何在 iOS 上获取 Facebook 归因 ID?

转载 作者:可可西里 更新时间:2023-11-01 03:35:19 26 4
gpt4 key购买 nike

如果用户在手机上安装了 Facebook 应用程序,则可以使用 Facebook 归因 ID。

在Android上,可以用这段代码提取—— Report Android app install back to facebook without using their api

通过查看 Facebook 的 iOS SDK,他们可以使用 -

+ (NSString *)attributionID {
return [[UIPasteboard pasteboardWithName:@"fb_app_attribution" create:NO] string];
}

( https://github.com/facebook/facebook-ios-sdk/blob/master/src/FBUtility.m )

但是当我在安装了 FB 应用程序的手机上调用此方法时,它返回 nil

如何在 iOS 上提取它?

最佳答案

不幸的是,我认为答案是你不能这样做。至少只要 Facebook 使用 UIPasteboard。

您帖子中的代码将访问特定于应用程序的粘贴板。如果它是由 Facebook 应用程序创建的,那么它只能由 Facebook 的其他应用程序访问。

The UIPasteboard class enables an app to share data within the app and with another app. To share data with any other app, you can use system-wide pasteboards; to share data with another app that has the same team ID as your app, you can use app-specific pasteboards.

以上引述自the docs

关于ios - 如何在 iOS 上获取 Facebook 归因 ID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20997589/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com