V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
SchrodingerCat
V2EX  ›  问与答

请教下, Facebook 的广告如何通过 api 去验证 idfa 来自 Facebook 的广告?

  •  1
     
  •   SchrodingerCat · Aug 24, 2020 · 1614 views
    This topic created in 2078 days ago, the information mentioned may be changed or developed.

    现在对接 Facebook 的广告,因为 Facebook 的广告对接是客户端使用的 sdk,然后用户点击广告也没有监测链接什么的。 查文档发现只有上报的接口 https://developers.facebook.com/docs/marketing-api/app-event-api#----, 没有获取验证 idfa 的接口。请教各位有对应的解决方案吗?

    8 replies    2020-08-31 12:01:29 +08:00
    DJQTDJ
        1
    DJQTDJ  
       Aug 24, 2020
    安卓不会,ios 我到能帮你
    SchrodingerCat
        2
    SchrodingerCat  
    OP
       Aug 24, 2020
    @DJQTDJ 现在接的是 ios 的,请教下你们是如何解决的
    SchrodingerCat
        3
    SchrodingerCat  
    OP
       Aug 24, 2020
    @DJQTDJ 方便留个微信请教吗
    DJQTDJ
        4
    DJQTDJ  
       Aug 24, 2020
    @SchrodingerCat


    #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
    }
    SchrodingerCat
        5
    SchrodingerCat  
    OP
       Aug 24, 2020
    @DJQTDJ 不太明白这个 viewDidLoad 和 yourSelector 是什么时候触发的呢?安装 app 之后就执行吗
    SchrodingerCat
        6
    SchrodingerCat  
    OP
       Aug 31, 2020
    @DJQTDJ 你发的这段代码只是获取到 idfa 信息,但是怎么去确定这个 idfa 是来自 Facebook 的广告呢?
    DJQTDJ
        7
    DJQTDJ  
       Aug 31, 2020
    @chrodingerCat
    FacebookUSER ID
    SchrodingerCat
        8
    SchrodingerCat  
    OP
       Aug 31, 2020
    @DJQTDJ FacebookUSER ID 不是用户通过 Facebook 账户登录的才有吗?我们没有接 Facebook 的登录
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   803 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:56 · PVG 05:56 · LAX 14:56 · JFK 17:56
    ♥ Do have faith in what you're doing.