DISCLAIMER
No maintenance on this package anymore. Prefer to use flutter_facebook_login
Facebook Connect for Flutter
Easy way to connect users to Facebook inside your application via OAuth2
See configuration for flutter_webview_plugin
Redirection Url need to be http://localhost:8080
.
Add following lines to Info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost:8080</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
Using FacebookConnect
class
final _facebookConnect = new FacebookConnect(
appId: '<APP_ID>',
clientSecret: '<CLIENT_SECRET');
FacebookOAuthToken token = await _facebookConnect.login();
Using FacebookLoginButton
widget
new FacebookLoginButton(
appId: '<APP_ID>',
clientSecret: '<CLIENT_SECRET>',
scope: [FacebookAuthScope.publicProfile],
onConnect: (api, token) {
...
}),
Please file feature requests and bugs at the issue tracker.