Is the FacebookConnectRequest() successful ?
Can you provide a log of the error and request?
You will need to add the Facebook corona plugin to your app.
Once this is set up you can use facebook.getCurrentAccessToken() to get the access token.
In Lua the request is
local requestBuilder = gs.getRequestBuilder() local FBAuthRequest = requestBuilder.createFacebookConnectRequest() FBAuthRequest:setAccessToken(accessToken) FBAuthRequest:setDoNotLinkToCurrentPlayer(false) FBAuthRequest:setErrorOnSwitch(false) FBAuthRequest:setSwitchIfPossible(true) FBAuthRequest:setSyncDisplayName(true) FBAuthRequest:send(function (FBAuthResponse) local authToken = FBAuthResponse:getAuthToken() local displayName = FBAuthResponse:getDisplayName(); local newPlayer = FBAuthResponse:getNewPlayer(); local scriptData = FBAuthResponse:getScriptData(); local switchSummary = FBAuthResponse:getSwitchSummary(); local userId = FBAuthResponse:getUserId(); end)
Thanks, Liam. I'm definitely interested. Facebook is just the beginning. I'm aware GameSparks has support for all kinds of third party accounts like Twitter, Twitch and Kongregate. Though, I imagine they're likely using a similar reg request process right?
If I can help with moving this along do drop me a line. I'm keen to find a solution sooner rather than later. I had a look in the Corona forums and there are people asking similar questions but I see GS support are in there already pointing to the tutorial I mentioned above.
I'm afraid we don't. We can look into this for you and maybe get an example together. Our Lua documentation is in the process of getting updated at the minute.