I want to add an option play with friends in my game. I am currently using photon unity networking which doesn't support that feature. The only workaround will be that all the players should know the room information so that they can join the same room. For that purpose, I am thinking of using Facebook invite system. I can send the invite to players who are currently using my game. Is there some way by which I can receive the invite within the app/game ? Is there a better way ?
There is facebook sdk for Unity3d, so you can just integrate it whatever you want about facebook, add friend, request friend list, invite friend etc..
https://developers.facebook.com/docs/unity
If you want to make the task a lot more easy (and invest a few bucks), you should check out prime[31] and the plugins they offer.
https://prime31.com/plugins
Related
I just would like to share my experience using the all_mutual_friends for a feature I'm developing for a social app. It has been acting weird and I would like to know your experience using it.
So, let's consider two users for this application, User A and User B - which they are not friends on FB. And as soon as any of the users connects, I grab the context-id of it.
Then if User A is seeing User B profile, I request all_mutual_friends for UserA with graph api with the syntax /{{context-id of UserB}}/all_mutual_friends
In my tests, I have an User C, which is friend with both User A and User B.
And here comes the tragedy. Sometimes it works, graph api brings data about User C, sometimes not. I mean, it was working until yesterday and at moment is not working.
I also use the graph API tool to check and re-check information and it seems it is not the code itself, but with FB.
All users have their account created as they would be regular FB users, I'm not using FB test accounts, they are included as Developers of the app and the feature is only available in development mode.
Do you guys have faced this situation? Is it related to the feature not being approved to be used public or there is nothing to do with it?
Thank you!
I was searching in the Facebook API documentation, but I can't find what I am looking for. So, what I am looking for is is there an API for creating your custom DO action. For example:
John Johson is riding a bike.
What I want is to send this 'riding' as a custom word coming from my app. And also 'bike' as a custom item as well.
The other example I can think about is the running apps in Facebook. When you start to run and connect the app with your Facebook the app can say.
John Johson is running using Runtastic.
Thanks!
Well, you’re a little too late on that one.
That used to be possible, it was called Custom Open Graph Actions - https://developers.facebook.com/docs/sharing/opengraph/custom
But those are now deprecated, you can not use them any more in new apps (and for existing ones, they will be removed within a year as well), see https://developers.facebook.com/docs/sharing/opengraph/custom-open-graph-deprecation
Now you can only use the built-in actions and objects, https://developers.facebook.com/docs/reference/opengraph
There are many games which use login but are in client side... But, can the games like Clash of Clans, Clash Royale and others be by-passed the login sequence and open up with a random profile though it uses Google Play games for verification, there must be some method? (its not related to 'hacking' but quite to 'enthusiastic'
Most of the logic to handle an anonymous profile is on the back end server. You can use an approach like Firebase Anonymous Authentication on Android and iOS to identify the player. Firebase Authentication also has the added advantage of being able to associate multiple authentication types to the same user, so if the game player decides to sign in with Google, or Facebook, for example, they won't lose anything they did as the anonymous user.
No, until we have access to Google Account which can help in by-passing the login sequence ('quite' close to it) .. The other methods might fall under other catagory so I'd rather prevent myself falling into that!
I'm making a game with the map, where shows the levels of player, like in Candy Crush. I need to show player's friends near levels, which they achieved. I can retrieve friends and their avatars from Facebook, but I need to know, which level they achieved, to set them the right place. I’m using Cocos2d-x 3.8.1 and Facebook SDK v.4.7.
So, my question: which is the preferred way to store data about levels? Can Facebook keep game's info, or I need to use only third-party servers, like Parse.com? I looked for this in .h files Facebook’s SDK and in SDKBOX, but I found nothing.
If storing on Facebook is possible, I would see the Facebook methods for this.
You have to store that on your own, there is no API for levels and stuff. There is only the Scores API and the Achievements API:
https://developers.facebook.com/docs/games/scores
https://developers.facebook.com/docs/games/achievements
How you store additional game info is up to you. You can use your own server with MySQL, MongoDB or whatever you like. Or you can use a cloud storage provider like Parse.
I've copied I code I used in an older game into my new game (it worked and still does in the old game) that I use to get the users friends list so I could publish (send) a message to which ever friends I want, inviting to play against me in my game, simple enough, no?
But it seems this does not work anymore, is that true? Does Facebook only allows an app to request just the list of your friends who also use the same app? I can't see how this helps the gaming industry get the word out on new games using the Facebook API to message about it from one user to his friend/s...
Am a complete fool and miss something? can the normal friends list be loaded into my Corona built game using the Facebook graph API?
Thanks.
Yes, Facebook has changed the rules and the me/friends will only return friends who have the app installed. You have to use various showDialog() features with friend pickers to see all your friends.