I am stuck with storing data.. I have completed the facebook login, now I need to make a scene(after you log in with your facebook) where you input your characters name and link it to the facebook, whenever player logs in with hes FB account, he will login with that character name. After all, that's not the interest, is there any specifical way to link ( character level, achievments to a characters name? I do realize I shhould use FIle I/O here, but I would like to understand how everything has to work in a right way.
Any useful tips?
Comments
to save and load data on device you can use datasaver module by ar2sawseen:
http://appcodingeasy.com/Gideros-Mobile/Save-and-load-data-module-for-Gideros-Mobile
and this is the known FB API Reference for your convenience.
https://github.com/gideros/giderosplugins/blob/master/Facebook/install.html
you can find this file in your gideros install dir too inside plugins/facebook
--authentication
facebook:login(appId, permissions)
facebook:logout()
--get session data
facebook:getAccessToken()
facebook:getExpirationDate()
--requests information
facebook:get(path, params) --general request for any graph query
facebook:getProfile(params)
facebook:getFriends(params)
facebook:getAlbums(params)
facebook:getAppRequests(params)
facebook:getScores(params)
--publish information
facebook:post(path, params) -- general post for any information
facebook:postScore({score: 123})
facebook:postPhoto(path, {message: , place: , album:})
facebook:postToFeed({message, link, picture, name, caption, description})
--delete
facebook:delete(objectId) --id of the object to delete
--dialogs
facebook:dialog(type, params)
facebook:inviteFriends({message, to, suggestions})
facebook:share({message, link, picture, name, caption, description})
EventsEvent.LOGIN_COMPLETE
Event.LOGIN_ERROR --contains (e.errror)
Event.LOGOUT_COMPLETE
Event.LOGOUT_ERROR --contains (e.errror)
Event.OPEN_URL --contains (e.url)
Event.DIALOG_COMPLETE --contains (e.type, e.response)
Event.DIALOG_ERROR --contains (e.type, e.errror)
Event.REQUEST_COMPLETE --contains (e.type, e.response)
Event.REQUEST_ERROR --contains (e.type, e.errror)
--e.type is basically type/path you passed to graph request or dialog,
--so you would know from what request are you receiving the response
If you want to save to cloud I don't know how to do it, but I am pretty sure that we don't have a plugin to do it (yet)
The only one who did something about facebook and multiplayer integration seems to be mertocan, whose game make extensive use of multiplayer and facebook. But I don't think it was "easy" to do it. I think he uses noobhub, and that he wrote his own logic for his multiplayer server.
What you can "easily" do is to login to fb, take the username from there and use it in local multiplayer (using unite framework). Then each player could share their score, and I believe fb could save those scores to a leaderboard.
But unless you understand net protocols and "advanced stuff" I don't think you can do much about multiplayer.
http://giderosmobile.com/forum/discussion/6166/clan-of-the-cloud-/p1
it seems it has changed name to Xtralife:
http://xtralife.cloud/