Open sallymariehollywood opened 4 years ago
What :o
Any news?
Or in case do you know an alternative?
same issue for us, any news ?
I have updated the version to the latest one and compiled again, for ios updated the pod file using pod update
Updating POD and Version isnt the issue - the problem is that this plugin uses an an obsolete UIWebView within iOS SDK. Submitting any app now to the APPLE APP STORE will get an instant rejection - hence the reason why Reflectly possibly is no longer supporting FaceBook logins. BTW - This plugin was written by Iiro Krankka who , works for Reflectly ....
@MsXam you know an alternative or howto develope facebook login without a plugin?
@GiacomoK You do not need this plugin to authenticate facebook but the facebook client side sdk's make the job easier. Now that the developers of Reflectly are abandoning their support for facebook with this plugin (because their plugin using obsolete SDK's which are prohibited now during app-store submissions) - one can implement a unified login that does the same outside the client side sdk's - You can use server side code to accomplish the same thing which is browser based and implement a web-flow login. I'm moving towards this approach now.
@MsXam Hi, could you help me with this idea of doing it from the server-side?
has anyone tried this solution? https://github.com/roughike/flutter_facebook_login/issues/209#issuecomment-563231679
@MsXam I have implemented web-view flow, in flutter and nodeJS if you are interested or anyone is, in the sample code, or probably converting to a plugin or something.
This should help,
Future<void> _loginWithFacebook() async {
Map<String, dynamic> result = await Navigator.push(
context,
MaterialPageRoute(builder: (context) =>
CustomWebView(
title: 'Facebook Login',
selectedUrl: 'https://www.facebook.com/dialog/oauth?client_id=$your_cliend_id&redirect_uri=$your_redirect_url=email,public_profile',
),
maintainState: true
),
);
if (result != null && result["authToken"] != null) {
_sendTokenToServer(
user: result,
authProvider: AuthProvider.Facebook
);
} else {
_showErrorOnUI(result != null ? 'Login error, this is our fault': 'You must be logged in to continue');
}
}
CustomWebView.dart
import 'dart:async'; import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class CustomWebView extends StatelessWidget { final String title; final String selectedUrl;
final Completer
CustomWebView({ @required this.title, @required this.selectedUrl, });
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
),
body: WebView(
initialUrl: selectedUrl,
javascriptMode: JavascriptMode.unrestricted,
javascriptChannels:
You can use this this way rather than this plugin as it is safe to assume it is no longer maintained.
@EmmanuelAmodu
Can you kindly expand on your solution with respect :
_sendTokenToServer(
And also your nodejs just for completeness as I think this could be a great solution now that this facebook plugin is no longer being maintained.
@bpaul7101 check it out here, I am working this. I have completed the mobile section, I would do the nodejs later
Hello, How about using the new branch:
dependencies:
flutter_facebook_login:
git:
url: https://github.com/roughike/flutter_facebook_login.git
ref: update-to-latest-fbsdk
@EmmanuelAmodu can you please show how to log out?
Hi , anyone working on this?
@Dhuliang Honestly, I've given up on this library and instead followed the instructions from the article @kareldebedts mentioned: https://medium.com/@karlwhiteprivate/flutter-facebook-sign-in-with-firebase-in-2020-66556a8c3586 It was not too challenging and I didn't need to worry about deprecated libraries. And I ended up having to do the same thing with Twitter too.
I did the same as @awhitford, it was barely any work to change to that library.
there is a new plugin on pub dev. Visit https://pub.dev/packages/flutter_facebook_auth. It resolves the UIWebView issue.
Please can you confirm the status of this project/plugin
Reflectly uses this but it seems that they are dropping support for FACEBOOK authentication and consequently this plugin.