facebook.login() is not working

I have went threw all the steps, creating a key hash for android for my game build in corona. I have create a Button for user login Facebook account. But don’t have any error massage and response when user touch the Button. Only have print output.

What am I missing? Please help.

  • I have create the Key Hashes using OPENSSL
  • Enter App ID from Facebook Developers
  • Enter Key Hashes to Facebook Developers
  • Enable “Single Sign On” and “Deep Linking”
  • Enter Class Name “com.ansca.corona.CoronaActivity” on Facebook Developers
  • include “android.permission.INTERNET” in build.settings

 

[lua]local facebook = require (“facebook”)

local fbAppID = “49911xxxxxx”

local function onClick( event )

if ( “ended” == event.phase ) then
print( “Button was pressed and released” )
facebook.login( fbAppID, facebookListener, { “publish_actions, email” } )
end
end

– Facebook Button
FacebookButton = widget.newButton {
defaultFile = “images/fb.png” ,
width = 240,
height = 120,
onEvent = onClick,
}
FacebookButton.x = display.contentWidth / 2
FacebookButton.y = display.contentHeight / 2[/lua]

Do you have a facebookListener function? You should be printing the result from FB there.

Personally I recommend getting the Corona FB demo working on a device and then start to implement into your app. Then you know for sure everything is setup correctly on the FB side.

Jonjonsson, thank you so much!!!

I have add “facebookListener” function and successful login

Do you have a facebookListener function? You should be printing the result from FB there.

Personally I recommend getting the Corona FB demo working on a device and then start to implement into your app. Then you know for sure everything is setup correctly on the FB side.

Jonjonsson, thank you so much!!!

I have add “facebookListener” function and successful login