The thing is that it doesn’t even load the plugin since the error triggered shows that the plugin is not found.
local composer = require( “composer” )
local widget = require(“widget”)
local scene = composer.newScene()
local json = require (“json”)
local facebook = require( “plugin.facebook.v4” )
local function handleButtonEvent( event )
if ( “ended” == event.phase ) then
facebook.login( facebookListener, { “email”, “user_birthday” } )
print( “Button was pressed and released” )
end
end
local linkFacebook = widget.newButton(
{
width = 80,
height = 80,
defaultFile = “ButtonsAccount/FBLink.png”,
overFile = “ButtonsAccount/FBLinkHL.png”,
onEvent = handleButtonEvent
}
)
– Position the button
linkFacebook.x = display.contentCenterX / 2
linkFacebook.y = display.contentCenterY +205
buttonsGroup : insert(linkFacebook)