After following your happy bird tutorial for unity I am still struggling with some stuff and think I'm missing something fundamental in my understanding of the system:/
What I would like to do is enable Facebook connectivity. So when user comes in they get an option to “login with Facebook” to post scores and connect with friends. They can “skip” this if need be.
I have watched the tuts with the tapppy bird example which basically pushes the user to login automatically without a button option:
Question 1
In your tappy bird example (i have built the example onto a device) the Facebook prompt comes up every time saying “you have already authorised this”. Is this typical or can this be made more seamless so the prompt doesn’t show if u already granted access?
Question 2
When I am trying MY test build (not tappy bird) in unity using the editor and I am get prompted to add the access token. I get back “account already linked” I’m really not sure what this means or how to overcome this? I have read the document which states “The current user has a Facebook profile and it’s not the profile they have just tried to log in with” but confused by what this means as I have only used one Facebook account?
thank u very much in advance and apologise if this are noob questions but i can’t quite get my head around it:/
ade
Best Answer
C
Customer Support
said
over 7 years ago
Hey Guys,
Kenneth is right in his last post, when GameSparks tries to log into facebook, it will add data to the player's information, effectively replacing the username and adding some FB data, like their id and authentication token from FB. So if you try to log into gamesparks again and the facebook id is already linked to will not allow you to link again.
In the Unity editor however, the facebook login will always prompt you for the authentication token. This is only in the editor though, and it is part of the FB SDK and wont occur on the device. So far as i know, the 'already authorised' prompt will not occur on the device either, and this again is part of the FB SDK.
I'm having the same issue as outlined in the OP's 2nd question. I have 2 users registered for my game, for testing purposes, and they are inconsistently able to log in. At first I thought this was simply a logic flaw in my coding, but I've been over it again and again and have had no further luck with figuring out why this happens. One of the accounts can log in just fine, and the other get's stuck and receives an "Account Already Linked" error from Gamesparks in the console. If I delete the user from the NoSQL database (player, externalAuthentication, etc.), they can log in again, but only once. After that, it's right back to the error. These are two separate, real Facebook accounts, so they should in no way be linked to each other or anything else, unless the fact that they're "friends" is enough to make things go haywire, which I'd certainly hope isn't the case. This sort of thing is more than a little maddening, especially since I am just a few short days away from having this game ready to publish (so long as I can iron out strange details like this one). Any advice would be most highly appreciated. If there is any further information I can provide, please let me know and I'll happily do so. Thank you.
K
Kenneth Rougeau
said
over 7 years ago
After testing on two different computers with the two accounts, I've noticed that I can log into one account on one computer, but not the other, and vice versa. This only seems to happen with WebGL builds, which I'm running in Chrome. I can log into either account, from either computer, when running a Unity Web Player version in Firefox or Internet Explorer. I've yet to find a work around, but thought I'd at least share my preliminary "discoveries" such as they are. Any further enlightenment or suggestions would be terrific.
K
Kenneth Rougeau
said
over 7 years ago
Alright, as the OP states, looking through the documentation shows that the "ACCOUNT_ALREADY_LINKED" error comes about when "the current user has a Facebook profile and it’s not the profile they have just tried to log in with". I've no idea just why the profile would "switch" when logging in and out of the same account, but it does look as though adding the "switchIfPossible:true" parameter into the login sequence might solve this issue since the documentation states that it will "switch to the supplied profile if it is already associated to a player". I haven't tested it yet, but will give it a shot shortly and see if it alleviates my own current issues.
I had also considered trying "doNotLinkToCurrentPlayer:true", but it sounds as if this might simply lead to multiple, unassociated records of the same user, which could create quite a mess (and is likely the reason it's set to false by default). Again, any additional feedback would be great. In the meantime, I'll flounder about and see what I come up with :)
Lastly, in regards to the OP's original question, I can only say that when running my own, FB Canvas based game, I'm only ever asked to authorize the application the very first time I use it. This may not be the case for mobile devices, but I'd guess there's likely something amiss with how you're handling the login itself. Without seeing your code, I couldn't say anything for sure.
1 person likes this
Customer Support
said
over 7 years ago
Answer
Hey Guys,
Kenneth is right in his last post, when GameSparks tries to log into facebook, it will add data to the player's information, effectively replacing the username and adding some FB data, like their id and authentication token from FB. So if you try to log into gamesparks again and the facebook id is already linked to will not allow you to link again.
In the Unity editor however, the facebook login will always prompt you for the authentication token. This is only in the editor though, and it is part of the FB SDK and wont occur on the device. So far as i know, the 'already authorised' prompt will not occur on the device either, and this again is part of the FB SDK.
ade goddard
Hi
After following your happy bird tutorial for unity I am still struggling with some stuff and think I'm missing something fundamental in my understanding of the system:/
What I would like to do is enable Facebook connectivity. So when user comes in they get an option to “login with Facebook” to post scores and connect with friends. They can “skip” this if need be.
I have watched the tuts with the tapppy bird example which basically pushes the user to login automatically without a button option:
Question 1
In your tappy bird example (i have built the example onto a device) the Facebook prompt comes up every time saying “you have already authorised this”. Is this typical or can this be made more seamless so the prompt doesn’t show if u already granted access?
Question 2
When I am trying MY test build (not tappy bird) in unity using the editor and I am get prompted to add the access token. I get back “account already linked” I’m really not sure what this means or how to overcome this? I have read the document which states “The current user has a Facebook profile and it’s not the profile they have just tried to log in with” but confused by what this means as I have only used one Facebook account?
thank u very much in advance and apologise if this are noob questions but i can’t quite get my head around it:/
ade
Kenneth is right in his last post, when GameSparks tries to log into facebook, it will add data to the player's information, effectively replacing the username and adding some FB data, like their id and authentication token from FB. So if you try to log into gamesparks again and the facebook id is already linked to will not allow you to link again.
In the Unity editor however, the facebook login will always prompt you for the authentication token. This is only in the editor though, and it is part of the FB SDK and wont occur on the device. So far as i know, the 'already authorised' prompt will not occur on the device either, and this again is part of the FB SDK.
Hope this helps,
-Sean
1 person has this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstKenneth Rougeau
Kenneth Rougeau
Kenneth Rougeau
I had also considered trying "doNotLinkToCurrentPlayer:true", but it sounds as if this might simply lead to multiple, unassociated records of the same user, which could create quite a mess (and is likely the reason it's set to false by default). Again, any additional feedback would be great. In the meantime, I'll flounder about and see what I come up with :)
Lastly, in regards to the OP's original question, I can only say that when running my own, FB Canvas based game, I'm only ever asked to authorize the application the very first time I use it. This may not be the case for mobile devices, but I'd guess there's likely something amiss with how you're handling the login itself. Without seeing your code, I couldn't say anything for sure.
1 person likes this
Customer Support
Kenneth is right in his last post, when GameSparks tries to log into facebook, it will add data to the player's information, effectively replacing the username and adding some FB data, like their id and authentication token from FB. So if you try to log into gamesparks again and the facebook id is already linked to will not allow you to link again.
In the Unity editor however, the facebook login will always prompt you for the authentication token. This is only in the editor though, and it is part of the FB SDK and wont occur on the device. So far as i know, the 'already authorised' prompt will not occur on the device either, and this again is part of the FB SDK.
Hope this helps,
-Sean
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics