- Home /
How can I import a friends' player information into the game?
Hey guys, I'm working on a little project using both Google and Facebook's APIs. Google will be handling multiplayer, saves and In-App purchases while Facebook handles all the social aspects.
My issue here, since I can't use Facebook to save data, is that I need to be able to take player data of a Facebook friend, and import it into the game similar to how a farm game operates.
For example, the player invites their friend through the Facebook API, after it's been accepted and the friend has downloaded the game, the player is then able to visit their friends farm.
How do I access this kind of data? can I access this through Google's API by referencing Facebook data, or would I need another dedicated cloud server?
Hope this all makes sense, I found it quite hard working out how to word it xD
Answer by yashpal · Apr 20, 2015 at 09:36 AM
hello @spaunn,
i think you want to do this.
the player invites their friend through the Facebook API, after it's been accepted and the friend has downloaded the game, the player is then able to visit their friends farm.
You can do this by facebookAPI, 1) you want to invite friend to game.
2) when friend accept the invitation it take to playtsore / appstore where friend can download app. (DeepLinking)
3) when friend open game you get some information about who send the invitation and downloaded game in (in deep linking methods).
ask freely if you have questions. Hope it helps
I still don't understand how I get the player data from my friend so I can actually generate their 'farm' in my game :(
hello @spaunn,
Sorry i can't understand your question properly.
Your main question is it possible to combine facebook friend api and google play service.
I don't find anything which can solve your problem. (please inform me if you find any solution.)
I think you need one dedicated server for that.
-You use facebook Official plugin. This one.
-Run demo scene named something like "interactive......".
-when you login you get one unique id of user. (which display at the bottom of demo scene.)
In facebook every user have its unique id.
so you need to keep database of this facebook unique id and email address of every person.
so when user send invitation to there friend. and if user's friend accept invitation than open app then you will find user facebook unique id and it's friend facbook unique id. in the deep linking.
so you will find out who send you invitation and from that you find out its email address via dedicated server.
and you find out who send you invitation.
i hope it more clear answer. ask freely if you have questions. Hope it helps
I want the player to be able to visit a friends farm. how do I get that data?
It has nothing to do with getting google to work with facebook, I just want to be able to share data between friends when they are offline
@spaunn, sorry for late replay,
I don't think you can share data offline.
you need to make one data string or class of farm and store it over web-server. so every one farm status is in web-server. when you get login you need to get your farm data and your friend farm data.
your friend farm data is use when you want to visit your friend's farm while offline.
i am sorry if i still not understand your question.
hope it helps
Your answer
Follow this Question
Related Questions
Login to facebook, twitter, google with OAuth 2 Answers
Simple share text to Facebook and Google+ (Android, IOS) 0 Answers
How can I sign in using google. 3 Answers
WebGL - Facebook and Google+ Share 0 Answers
Facebook plugin problems 1 Answer