hi,
Now i am using corona sdk 746 build . In my game i want to post my high score into facebook. but when i click facebook button it will quite the application and goto web browser open facebook . it will show some error…
This is my code.
*******************
local facebook = require “facebook”
local appId = “XXXXXXXXXX”
_G[“Score”] = 100
local Facebookimage = display.newImage(“FacebookConnect.png”)
local Facbook_Listener = function ( event )
if event.phase == “ended” then
if appId then
local function listener_Facebook( event )
if ( “session” == event.type ) then
if ( “login” == event.phase ) then
local statusUpdate = “xxxx”
facebook.request( “me/feed”,“POST”,{
name=statusUpdate,
message = “xxxxx- My High Score “…_G[“Score”],
caption=” A mobile game developed by xxxxxx.”,
picture=“http://xxxxxx/wp- content/uploads/2011/10/Icona.png”} )
end
end
end
facebook.login( appId, listener_Facebook, {“publish_stream”} )
end
end
end
Facebookimage:addEventListener(“touch”,Facbook_Listener)
*******************
thanks.
[import]uid: 119468 topic_id: 21891 reply_id: 321891[/import]
[import]uid: 52491 topic_id: 21891 reply_id: 87235[/import]