facebook_web_sdk library

Give you acces to the facebook js sdk in Dart

Classes

AuthResponse
FbInitOption
LoginStatusResponse
UiResponseData

Functions

addFacebookScript({String lang: 'en_US'}) → void
fbAsyncInit() Future<void>
getAuthResponse() → JsLoginStatusResponse
The method getAuthResponse is a synchronous accessor for the current authResponse. The synchronous nature of this method is what sets it apart from the other login methods. [...]
getLoginStatus() Future<LoginStatusResponse>
getLoginStatus allows you to determine if a user is logged in to Facebook and has authenticated your app. There are four possible states for a user: The user is logged into Facebook and has authorized your application. LoginStatus.connected The user has previously logged into your application but your authorization to access their data has expired. LoginStatus.authorizationExpired The user is logged into Facebook but has not authorized your application. LoginStatus.notAuthorized The user is either not logged into Facebook or explicitly logged out of your application so it doesn't attempt to connect to Facebook and thus, we don't know if they've authenticated your application or not. LoginStatus.unknown Knowing which of the these three states the user is in is one of the first things your application needs to know on page load. [...]
init(FbInitOption option) → void
The method init is used to initialize and setup the SDK. If you have followed our SDK quickstart guide, you won't need to re-use this method, but you may want to customize the parameters used. [...]
login([List<String> scopes]) Future<LoginStatusResponse>
Prompts a user to login to your app using the Login dialog in a popup. This method can also be used with an already logged-in user to request additional permissions from them. [...]
logout() Future<void>
The method logout logs the user out of your site and, in some cases, Facebook. [...]
uiShareDialog({String href, String hastag, String quote, bool mobileIframe: false}) Future<UiResponseData>
The Share dialog gives people the ability to publish an individual story to their timeline, a friend's timeline, a group, or in a private message on Messenger. This does not require Facebook Login or any extended permissions, so it is the easiest way to enable sharing on the web.

Enums

LoginStatus

Typedefs

GetLoginStatusFunction(JsLoginStatusResponse response) → void