Liking a page is not possible via Graph API.
Sharing is quite easy though…
Code would be somewhat like this…
[lua]ocal facebook = require “facebook”
– listener for “fbconnect” events
local function listener( event )
local phase = event.phase
local type = event.type
if ( type==“session”) then
if ( phase==“login”) then – upon successful login, share on wall
facebook.request( “me/feed”, “POST”, {message = “Sharing on Facebook Wall”} )
elseif phase == “loginFailed” or phase == “loginCancelled” then
–unable to login
end
elseif ( type==“request” ) then
– event.response is a JSON object from the FB server
if event.error then
–error posting on wall
else
–successfully posted on wall
end
end
end
– first argument is the app id that you get from Facebook
facebook.login( FACEBOOK_APP_ID, listener, {“publish_stream”} )[/lua] [import]uid: 64174 topic_id: 34749 reply_id: 138081[/import]