请教下, Facebook 的广告如何通过 api 去验证 idfa 来自 Facebook 的广告?
现在对接 Facebook 的广告,因为 Facebook 的广告对接是客户端使用的 sdk,然后用户点击广告也没有监测链接什么的。 查文档发现只有上报的接口 https://developers.facebook.com/docs/marketing-api/app-event-api#—-, 没有获取验证 idfa 的接口。请教各位有对应的解决方案吗?
现在对接 Facebook 的广告,因为 Facebook 的广告对接是客户端使用的 sdk,然后用户点击广告也没有监测链接什么的。 查文档发现只有上报的接口 https://developers.facebook.com/docs/marketing-api/app-event-api#—-, 没有获取验证 idfa 的接口。请教各位有对应的解决方案吗?
#import <AdSupport/ASIdentifierManager.h>
NSString *userId = [[[ASIdentifierManager sharedManager]
advertisingIdentifier] UUIDString];
// Next: Store the user ID in your database
———————————————————————————-
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
– (void)viewDidLoad
{
// Enable profile updates for example in `viewDidLoad`
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
}
– (void)yourSelector
{
// Once user is logged in via Facebook Login you can call:
NSString *userId = [FBSDKProfile currentProfile].userID;
// Next: Store the user ID in your database
}