Android Defered DeepLink not working

浪子不回头ぞ 提交于 2020-06-17 12:58:55

问题


I got problem to make the FB.Mobile.FetchDeferredAppLinkData() function to work on android, all works well on IOS but on Android I just get {"did_complete":true,"callback_id":"2"} as response from Facebook, no URL.

I saw in the logcat a message from GraphRequest : Warning: Request without access token missing application ID or client token.

So I added the ClientToken in the AndroidManifest.xml and the FacebookSettings (adding it only in the setting didn't work), OK the warning is gone, but I'm still getting the same result without url.

Here is my code to test the deep link:

void Awake ()
{
    if( !FB.IsInitialized ) 
    {
        FB.Init( InitCallback );
    } 
    else 
    {
        InitCallback();
    }
}

private void InitCallback ()
{
    if( FB.IsInitialized ) 
    {
        FB.ActivateApp();
        FB.Mobile.FetchDeferredAppLinkData( InvokeURIRecived );
    } 
    else 
    {
        Debug.Log( "Failed to Initialize the Facebook SDK" );
    }
}

private void InvokeURIRecived( IAppLinkResult result )
{
    Debug.Log( "InvokeURIRecived " + result.RawResult );
}

To test the deferred deep link :

  • I go to https://developers.facebook.com/tools/app-ads-helper
  • I select my app
  • I click on Test Deep Link
  • I enter the deeplink: myapp://test?id1=1&id2=test_deeplink
  • I Uninstall the app on my device
  • I click on the notification just received from facebook
  • I install my app from unity and launch it

Did I missed somethig ? I search on google but nobody seems to have problem using this...

[EDIT]

I tried with the Facebook Unity SDK (v7.10.1) sample app and I got the same results.


回答1:


The problem has been solved by resetting advertising IDs on the devices. I followed the instructions found here: How to reset your advertising ID on Android.

(This information was posted in a comment, apparently by the OP from a different Stack Overflow account. I wanted to add it as an answer to make it clear that the question has been answered.)



来源:https://stackoverflow.com/questions/47979359/android-defered-deeplink-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!