--Required changes in your xCode project: -- In your main plist file, add the following lines: -- FacebookAppID : YOUR_FB_APP_ID -- FacebookDisplayName : YOUR_FB_DISPLAY_NAME -- Add the following url scheme: -- fbYOUR_FB_APP_ID --jpFacebook API jpFacebook.activate ( sUserToken, sActivationKey ) jpFacebook.login ( ) jpFacebook.logout ( ) bYes = jpFacebook.isSessionOpen ( ) jpFacebook.kSessionStateClosed jpFacebook.kSessionStateOpen "onFacebookSessionStateChanged" ( kSessionState ) "onFacebookSessionStateChangedError" ( sError ) jpFacebook.postStatusUpdate ( sUrl, sName, sCaption, sDescription, sPictureUrl ) "onFacebookStatusUpdateSucceed" ( ) "onFacebookStatusUpdateFailed" ( sError ) jpFacebook.sendInvite ( sMessage, bFrictionlessInvite ) "onFacebookSendInviteSucceed" ( ) "onFacebookSendInviteCancelled" ( ) "onFacebookSendInviteFailed" ( sError ) jpFacebook.pickFriends ( sTitle ) "onFacebookUserDidPickFriends" ( sXmlFriends ) jpFacebook.pickPlace ( sTitle, nLatitude, nLongitude ) "onFacebookUserDidPickPlace" ( sXmlPlace ) jpFacebook.graphRequest ( sRequest, bOptTypePOST, htOptParams ) "onFacebookGraphRequestSucceed" ( sXmlResult ) "onFacebookGraphRequestFailed" ( sError ) jpFacebook.uploadPhoto ( sFileURI ) "onFacebookUploadPhotoSucceed" ( ) "onFacebookUploadPhotoFailed" ( sError ) -- Upload Photo Sample: -- local sFile = "myScreenShot.jpg" -- local sFileURI = system.getDocumentsDirectory ( ).."/"..sFile -- application.saveCurrentUserViewportToTexture ( sFile, 800, 600 ) -- cache.sendFile ( sFile, "file://"..sFileURI ) -- jpFacebook.uploadPhoto ( sFileURI )
Facebook SDK is a set of APIs from Facebook that enable Facebook members to log onto third-party websites, applications, mobile devices and gaming systems with their Facebook identity. Developers can use these services to help their users connect and share with their Facebook and increase engagement for their website or application.
This plugin allows you to: