hmm…Well, the LogInWithReadPermissions looks like ours, so I’m going to assume it’s correct.
You could always run your queryString and see if it returns the email. I know we’re getting it on our end for our game.
The permission list isn’t going to include the publish_action because you ask for that after you check which permissions are granted. Actually, you’re asking for it in the loop right now which isn’t correct. You should verify there is no publish_action permission and then prompt. Doing it in the loop will ask over and over again if the user doesn’t grant it.
thanx a lot Branthnann , it’s working now
the problem was the acces token , the default one does not have the permissions i was asking for this is why i was getting user friends and public profile only , the place where to get acces token with desired permissions is open graph API tool
here is the link in case someone was in the same situation as mine
hmm…Well, with testing in the editor, I usually just use my access token under tools for my account. Or, there are also test user accounts which should also prompt for permissions.
Glad you got it working though! FB docs aren’t always maintained very well, so sometimes it can be confusing.
1 Like
thanx a lot brathnann,
i forgot to mention that the code i posted above is incorect as you noted, FB.LogInWithPublishPermissions(new List() { “publish_actions” })
will be called multiple times inside for, i have added a break, to that for loop to solve this issue ,
I know this thread id quite old, but is there anyway to can retrieve the list of all user’s score in my app, not only friends? I cannot see the description on official FB pages, they just said that you can get friends’ score using user_friends permission. However, based on my test, without user_friends permission, FB responses only friends’s score in my app.
Any help? If this cannot be reached, i think I have to use other 3rd party leaderboard, any recommendation the reliable one?
If you mean, get a leaderboard for all users, FB to my knowledge doesn’t support that.
Depending on how many leaderboards you need, there are two we use at the moment. Braincloud allows unlimited leaderboards on an app, but cost $30 a month once live.
Playfab is free, but has limitations on its free tier which may be enough for you, but looks like it would get expensive quickly if you went beyond the free tier limits.
There is also Gamesparks, but I haven’t used that yet in any projects.
Google offers Firebase which also has a free tier with limits as well.
Hi, I am new to game development and I would like to know how do I set a score and post on Facebook to create a leader board for friends only.
Thanks.
If you are using Facebook for your scoring, they have examples on their developer site for how to do scoring as well as a project Friend Smash that I believe has examples. Probably better you dig into those.
Thanks Brathnann
I managed to post my score and my friend score only when I signed him as a tester. when he is not a tester he cannot post his score and my app is already live but I have submitted it for review for the app center. Is that happening because the app is under App center review or there is another reason?
Yeah, if you haven’t been approved, many of the features don’t work. Once they approve your app, you should see what permissions were approved with it.
I think scores requires publish permission if I recall, but I am not sure. We use a different service for leaderboard stuff.