Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How use facebook Deferred App Link Data android? #611

Closed
pavlo-kravchenko opened this issue Oct 26, 2019 · 80 comments
Closed

How use facebook Deferred App Link Data android? #611

pavlo-kravchenko opened this issue Oct 26, 2019 · 80 comments
Labels

Comments

@pavlo-kravchenko
Copy link

I need use Deferred app deeplink in my Android app, but in next code i get appLinkData = null

    AppLinkData.fetchDeferredAppLinkData(this, getString(R.string.facebook_app_id),
            new AppLinkData.CompletionHandler() {
                @Override
                public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
                    Log.d("SplashActivity", "appLinkData: " + appLinkData);
                }
            }
    );

If I use Notification all work (Using the DEEP LINK TESTING TOOL) But me need exactly Deferred deeplink

I read:
https://developers.facebook.com/docs/app-ads/deep-linking https://developer.android.com/training/app-links/deep-linking
but this not help me

My Manifest

 <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />

    <activity
        android:name="com.facebook.FacebookActivity"
        android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:label="@string/app_name" />

    <activity
        android:name="com.tanat.posture.SplashActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="posture"/>
        </intent-filter>
    </activity>

My SplashActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);

    AppLinkData.fetchDeferredAppLinkData(this, getString(R.string.facebook_app_id),
            new AppLinkData.CompletionHandler() {
                @Override
                public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
                    Log.d("SplashActivity", "appLinkData: " + appLinkData);
                }
            }
    );

    Intent intent = getIntent();
    String action = intent.getAction();
    Uri data = intent.getData();
    Log.d("SplashActivity", "data: " + data);
}
@KylinChang
Copy link
Contributor

Hi @pavel-zlotarenchuk , the deep link testing tool can also send deferred link, have you tried that?

@pavlo-kravchenko
Copy link
Author

Hi @KylinChang
Of course, I also tried to install the application through the preview of the ad
But this not help me

@KylinChang
Copy link
Contributor

Hi @pavel-zlotarenchuk , thanks for the information. Generally speaking, deferred link should also work if notification works for you. It would be better if you can also provide your app ID. You can send your app ID to my email [email protected].

@pavlo-kravchenko
Copy link
Author

@KylinChang I wrote to you in the mail

@pavlo-kravchenko
Copy link
Author

@KylinChang Hi, what can you say?

@EAdemov
Copy link

EAdemov commented Nov 1, 2019

Got the same problem. Any news?

@pavlo-kravchenko
Copy link
Author

@EAdemov Hi
Waiting for a response from @KylinChang

@PNixx
Copy link

PNixx commented Nov 5, 2019

Got the same problem

@hamzahayat
Copy link

Same issue! +1

@pavlo-kravchenko
Copy link
Author

@KylinChang Any news?

2 similar comments
@dmytro-ostapovets
Copy link

@KylinChang Any news?

@pavlo-kravchenko
Copy link
Author

@KylinChang Any news?

@dima78442
Copy link

@KylinChang I wrote you email too, got the same issue, pls help us solve this problem

@pavlo-kravchenko
Copy link
Author

@madkinadm
Copy link

@KylinChang Any news?

@madkinadm
Copy link

One Facebook developer account, Android Studio:

  • An application made from scratch by documentation of deferred deep links does not receive data - applinks are empty
  • The application, the code of which is copied from the old application, in which worked deferred deep links, the data gets - applinks has the content.

Is it possible that a non-working Facebook SDK is downloaded from the repository?

@devussy
Copy link

devussy commented Dec 6, 2019

@KylinChang Any news?

@madkinadm
Copy link

My attempts to use several of my devices (ZTE, Xioami, Huawei) and my research of application usage data from users have shown that the problem is not present everywhere. So far I have localized the problem with my Facebook account. I'm not sure that all users of my application are getting the deferred deep links

@dkolomiets
Copy link

Same issue... @KylinChang Any updates?

@hamoudchohan
Copy link

I am facing same issue. any update? is it solved?

@mainuddinm55
Copy link

I facing the same issue. any update?

1 similar comment
@gxs-gc
Copy link

gxs-gc commented Dec 27, 2019

I facing the same issue. any update?

@gxs-gc
Copy link

gxs-gc commented Dec 27, 2019

@madkinadm Did you solve this problem

@madkinadm
Copy link

@madkinadm Did you solve this problem

I observe that the users of my application have no problem. I conclude that there is a problem with my Facebook developer account.

@gxs-gc
Copy link

gxs-gc commented Dec 27, 2019

W/MDCLAN_FCH: Failed to find class in boot class loader (may not be fatal): descriptor=Lcom/xx/xx
fb4a.AppModuleFallbackLoader: Same class failed twice com.xx.xx.xxActivity

@gxs-gc
Copy link

gxs-gc commented Dec 27, 2019

@pavel-zlotarenchuk Uri targetUrl = AppLinks.getTargetUrl(getIntent()); This method can be received, but the following method cannot receive delayed deep links
AppLinkData.fetchDeferredAppLinkData(this, new AppLinkData.CompletionHandler() { @Override public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {

@kamleshkarwande
Copy link

for me both AppLinks.getTargetUrl(getIntent()); and AppLinkData.fetchDeferredAppLinkData(this, new AppLinkData.CompletionHandler() {} are always null.

@gxs-gc
Copy link

gxs-gc commented Jan 3, 2020

I solved the problem, when you need to log out and log in to Facebook before testing, but I don't know why

@hamoudchohan
Copy link

I solved the problem when you need to log out and log in to Facebook before testing, but I don't know why

@creativityingenuity can you please explain?

@gxs-gc
Copy link

gxs-gc commented Jan 4, 2020

@hamoudchohan You need to log out of your Facebook account on your phone, then log in, and then send a deep link, so fetchDeferredAppLinkData is not null

@prcGit
Copy link

prcGit commented May 20, 2020

@juanimoli For testing I'm tapping on FB deeplink notification and once redirected to Play Store I install my debug apk to see all the info when fetching data. Is this the expected way to be tested?

@juanimoli
Copy link

@juanimoli For testing I'm tapping on FB deeplink notification and once redirected to Play Store I install my debug apk to see all the info when fetching data. Is this the expected way to be tested?

Be careful about this. FB configuration makes you put the app ID of the application. If your app changes your app ID depending on the selected build type, then you won't be able to use it.

Regarding of versions, I'm using latest FB SDK version, but just app-links dependency, not the whole SDK.

As far as I know, the issue was in registration of devices, not with SDK itself. Try to do the steps I mentioned with any SDK version and it should work.

@ab180-wontakkim
Copy link

@prcGit have you checked your hash key?

@prcGit
Copy link

prcGit commented May 21, 2020

thanks @juanimoli , @ab180-wontakkim the issue was that I was not configuring the deferred deeplink in FB ads-helper tool properly... now working 👍

@onkarpandit0409
Copy link

onkarpandit0409 commented May 26, 2020

I am still facing this issue, I tried re-installing the fb app a couple of times, my fbsdk is latest. Any ideas how I can fix it?
@juanimoli what did you mean by reseting advertisers id?
@prcGit can you please tell what you missed while configuring it?

@ab180-wontakkim
Copy link

ab180-wontakkim commented Jul 1, 2020

This would works for me

Try to log out/log in again in FB app. The issue was from the registration of the devices and that should fix it.

@anton-klimov-gismart
Copy link

anton-klimov-gismart commented Aug 28, 2020

Faced with the same issue. Deferred deep links worked fine with Ads Helper, but AppLink data was null from test ads (campaign was published but stopped). In our case reseting of advertisement id helped us. Thanks to @juanimoli

@juanimoli
Copy link

I am still facing this issue, I tried re-installing the fb app a couple of times, my fbsdk is latest. Any ideas how I can fix it?
@juanimoli what did you mean by reseting advertisers id?
@prcGit can you please tell what you missed while configuring it?

you can reset your adv. id from Google's settings from phone: https://www.groundtruth.com/reset-advertising-device-id/#:~:text=To%20reset%20your%20Advertising%20Identifier%20on%20macOS%2C%20choose%20Apple%20menu,the%20Reset%20Advertising%20Identifier%20button.

@sanguinius-prime
Copy link

I'm facing the same issue.
Even after resetting the advertising ID my deferred deep link still null.
json deferredApplinkResponse {"success":"true"}
Testing it with Ads Helper with "Send Deferred" and "Send Notification" options checked.
Phone: Samsung A20s

My code

        FacebookSdk.setAutoInitEnabled(true);
        FacebookSdk.setAdvertiserIDCollectionEnabled(true);
        FacebookSdk.setAutoLogAppEventsEnabled(true);
        FacebookSdk.fullyInitialize();
        AppLinkData.fetchDeferredAppLinkData(this, new AppLinkData.CompletionHandler() {
            @Override
            public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
                Log.d("Facebook Deferred", "Link data: " + appLinkData);
            }
        });

Someone found any solution or what is the problem?

@juanimoli
Copy link

I'm facing the same issue.
Even after resetting the advertising ID my deferred deep link still null.
json deferredApplinkResponse {"success":"true"}
Testing it with Ads Helper with "Send Deferred" and "Send Notification" options checked.
Phone: Samsung A20s

My code

        FacebookSdk.setAutoInitEnabled(true);
        FacebookSdk.setAdvertiserIDCollectionEnabled(true);
        FacebookSdk.setAutoLogAppEventsEnabled(true);
        FacebookSdk.fullyInitialize();
        AppLinkData.fetchDeferredAppLinkData(this, new AppLinkData.CompletionHandler() {
            @Override
            public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
                Log.d("Facebook Deferred", "Link data: " + appLinkData);
            }
        });

Someone found any solution or what is the problem?

I don't really know if they see these issues, you should try FB bug reporting platform: https://developers.facebook.com/support/bugs

@sanguinius-prime
Copy link

@juanimoli I'll try, thank you

@BhavaniBas
Copy link

BhavaniBas commented Jan 11, 2021

Hi,
Still I am facing same issue. I don't know how to solving this issue?? Please tell and help me .. Because I just follow App link Data related data's. But Still not get exact solution. App link Data returns null value. Click on Ads redirects to the exact app but returns the null value.

   FacebookSdk.setAutoInitEnabled(true);
    FacebookSdk.setAdvertiserIDCollectionEnabled(true);
    FacebookSdk.setAutoLogAppEventsEnabled(true);
    FacebookSdk.fullyInitialize();
    FacebookSdk.setIsDebugEnabled(true);
    FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS);
    AppLinkData.fetchDeferredAppLinkData(this, appLinkData -> {
               // Process app link data 

}

@stale
Copy link

stale bot commented Jun 26, 2021

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jun 26, 2021
@btonella
Copy link

Hi, facing the same issue. The app opens but the appLinkData is always null.

@stale stale bot removed the Stale label Jul 20, 2021
@Siletskiy
Copy link

AppLinkData.fetchDeferredAppLinkData(getApplicationContext(), appLinkData -> { if (appLinkData != null) { } } );

@github-actions
Copy link

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Oct 21, 2021
@github-actions
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@ivfr89
Copy link

ivfr89 commented Nov 19, 2021

Any news about this? appLinkData is always null using fetchDeferredAppLinkData. Analysing the code, it seems that Graph made an api Request but the response is {success: true}, but nothing more. Can anyone tell me why is this happening?

@erikmon
Copy link

erikmon commented Nov 19, 2021

Can anyone help please?

appLinkData is ALWAYS null.

@roneyyb
Copy link

roneyyb commented Feb 17, 2024

Still facing same issue getting null

@Nikhil77sutara
Copy link

same issue am also facing
getting the appLinkData as null?

Playgirlkaybraz11 referenced this issue Jun 19, 2024
Reviewed By: mingcaozhang

Differential Revision: D40125158

fbshipit-source-id: 58e7d605b63f24d0e8c35abb046d0ebae2edf9ae
@AntonioShare
Copy link

AntonioShare commented Sep 20, 2024

Is this problem solved? I am using version 17.0.2 and it still doesn't work.

@Nikhil77sutara
Copy link

@AntonioShare I also struggled a lot but after using the SDK version 17.0.0 it started working for me.

@AntonioShare
Copy link

@AntonioShare I also struggled a lot but after using the SDK version 17.0.0 it started working for me.

I found that I can use the official advertising test to be effective

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests