Type Boolean Revision Release 2022.3683 Keywords Facebook, isActive See also facebook.init() facebook.*
Used to confirm that the Facebook plugin is properly initialized after calling facebook.init() and waiting for a fbinit event, upon which this property will be true
false
otherwise)
Some functions/properties require facebook.isActive
to be true
before giving reliable results. This is noted in their respective documentation.
facebook.isActive
local facebook = require( "plugin.facebook.v4a" ) local function facebookInitListener( event ) print( "Facebook initialized" ) if ( facebook.getCurrentAccessToken() == nil ) then print( "Login required!" ) facebook.login() else print( "Already logged in!" ) end end -- Set the "fbinit" listener to be triggered when initialization is complete facebook.init( facebookInitListener )