Closed Fabien244 closed 2 years ago
I'm running into the same issue. When trying to retrieve data from deeplink, it returns an empty string for me ("")
Anyone have any news about that?
Until now, we still haven't found the answer. 2021
facebookSDK() {
this.fb.getDeferredApplink().then((val) => {
this.alert.create({
header: 'Get Deferred App Link',
message: JSON.stringify(val),
buttons: [
{
text: 'Ok, This is Sample!',
role: 'cancle'
}
]
}).then(a => a.present());
}, (error) => {
this.alert.create({
header: 'Get Error Deferred App Link',
message: JSON.stringify(error),
buttons: [
{
text: 'Ok, This is Sample!',
role: 'cancle'
}
]
}).then(a => a.present());
});
this.fb.logEvent(this.fb.EVENTS.EVENT_NAME_ADDED_TO_CART);
}
This plugin is deprecated. Check out cordova-plugin-facebook-connect
at https://www.npmjs.com/package/cordova-plugin-facebook-connect.
To use the getDeferredApplink
method on iOS, you must use a plugin such as cordova-plugin-idfa to request ad tracking permission.
For example:
cordova.plugins.idfa.requestPermission().then(function() {
facebookConnectPlugin.setAdvertiserTrackingEnabled(true);
facebookConnectPlugin.getDeferredApplink(function(url) {
console.log('url = ' + url);
});
});
On Android, no additional plugin is required.
We connect a deeplink FB, but we get an empty test result. appLinkData is Empty
AppLinkData.fetchDeferredAppLinkData(cordova.getActivity().getApplicationContext(), new AppLinkData.CompletionHandler() { @Override public void onDeferredAppLinkDataFetched( AppLinkData appLinkData) { PluginResult pr; if (appLinkData == null) { pr = new PluginResult(PluginResult.Status.OK, ""); } else { pr = new PluginResult(PluginResult.Status.OK, appLinkData.getTargetUri().toString()); } callbackContext.sendPluginResult(pr); return; } });