eng-dev/LiveSDK-for-Windows
Live SDK for .Net
Discovered public repositories for eng-dev in the GitHub catalog.
Live SDK for .Net
local facebook = require "facebook" -- You must use your own app id for this sample to work local fbAppID = "" --app id local function onLoginSuccess() -- Upload 'test.jpg' to current user's account local attachment = { message = "Test share photo.", source = { baseDir=system.ResourceDirectory, filename="test.jpg", type="image" } } facebook.request( "me/photos", "POST", attachment ) end -- facebook listener local function fbListener( event ) if event.isError then native.showAlert( "ERROR", event.response, { "OK" } ) else if event.type == "session" and event.phase == "login" then -- login was a success; call function onLoginSuccess() elseif event.type == "request" then -- this block is executed upon successful facebook.request() call native.showAlert( "Success", "The photo has been uploaded.", { "OK" } ) end end end -- photo uploading requires the "publish_stream" permission facebook.login( fbAppID, fbListener, { "publish_stream" } )