Type Boolean Revision Current Public Release (2018.3326) Keywords Facebook, isActive See also facebook.*
Used to confirm that the Facebook plugin is properly initialized after calling
require( "plugin.facebook.v4" )
true if the Facebook plugin was successfully initialized,
Some functions/properties require
facebook.isActive to be
true before giving reliable results. This is noted in their respective documentation.
local facebook = require( "plugin.facebook.v4" ) local function enforceFacebookLogin() if ( facebook.isActive ) then if ( facebook.getCurrentAccessToken() == nil ) then print( "Login required!" ) facebook.login() else print( "Already logged in!" ) end else print( "Please wait for Facebook to finish initializing before checking the current access token." ) end end enforceFacebookLogin()