getFacebookConnectionUrl method
Gets facebook initial connection url before linking.
Implementation
Future<void> getFacebookConnectionUrl() async {
// _incomingLinkHandler();
getConnectionUrlLoadingStatus.value = true;
try {
// _loadingService.show(status: 'Processing...');
final response = await _linkingRepository.getFacebookConnectionUrl();
if (response.status == 'success') {
// _loadingService.dismiss();
getConnectionUrlLoadingStatus.value = false;
//log(response.data.toString());
initUniLinks();
await _loadFromUrl(response.data ?? '');
}
} catch (e) {
if (e is DioError) {
getConnectionUrlLoadingStatus.value = false;
linkingError.value =
e.response?.data['message'] ?? 'Error connecting account';
// _loadingService.showError(
// e.response?.data['message'] ?? 'Error connecting account');
} else {
getConnectionUrlLoadingStatus.value = false;
linkingError.value = 'Error connecting account';
// _loadingService.showError('Error connecting account');
}
getConnectionUrlLoadingStatus.value = false;
// _loadingService.dismiss();
}
}