Is there a way to send a message to a unity client not logged in yet?
O
One More Turn
started a topic
almost 7 years ago
I'm attempting to create a way for unity standalone users to log in / sign up on facebook. Facebook's unity sdk only supports mobile and web.
My plan is to have the user log in on a spin-off web client. The flow is,
user selects log in / sign up on the standalone client
the client opens a url with the spin-off web client (containing a client ID of some sorts trailing the url)
the user logs in / signs up in the spin-off web client
on success, the response or data is sent to the standalone client via the trailing ID on the absolute url
is this possible with gamesparks? If not, any idea on alternatives?
Thanks for your time! Loving gamesparks, kinda glad parse is closing since it led me to you :)
Best Answer
C
Customer Support
said
almost 7 years ago
Hi One More Turn,
That would all work without issue up to the point where you want to sent responses back to the standalone client from the WebGL client.
The main hurdle here is getting the token, if you could find a way to handle that you could skip the web client step.
As mentioned Facebook do not support this from a desktop client and have not provided an SDK. Everything you want to do is possible with GameSparks but you need to get that token from Facebook.
Once you manage to get the token you can have a look at he following scripts which contain a method of using the token which has worked for some customers in the past.
As you mentioned, Facebook auth on a desktop client is not supported by Facebook themselves but I believe there may be paid plugins on the Unity Store that will address that issue. Your primary concern would be getting the auth token from Facebook.
There may be alternatives though, depending on what you have planned for your game.
Let me point you to a few relevant tutorials/documentation that may be useful:
Yes, the unity facebook sdk does not support Windows, Mac, and Linux builds. But it does support Web GL.
So, the Windows, Mac, and Linux platforms can open up the web browser to a Web GL spin-off client where facebook works. We then use that web gl client to get all our required info and then send it back to originating Windows / Mac / Linux client.
This is what inspired me but I don't have my own server so I wanted to see if I can use gamesparks solely.
Customer Support
said
almost 7 years ago
Answer
Hi One More Turn,
That would all work without issue up to the point where you want to sent responses back to the standalone client from the WebGL client.
The main hurdle here is getting the token, if you could find a way to handle that you could skip the web client step.
As mentioned Facebook do not support this from a desktop client and have not provided an SDK. Everything you want to do is possible with GameSparks but you need to get that token from Facebook.
Once you manage to get the token you can have a look at he following scripts which contain a method of using the token which has worked for some customers in the past.
Cheers.
Oisin
Customer Support
said
almost 7 years ago
we are having some problems with the forum and it seems that the scripts Oisin gave you are appearing as images. If you right-click on the images in the post above and open them in a new tab, or choose 'view as image' you should be able to see those examples.
Sean
O
One More Turn
said
almost 7 years ago
ah ok so its not possible. The entire plan was to get the token from the web gl to the standalone client.
Guess I can't do it :,(
Thanks for your help though!
Customer Support
said
almost 7 years ago
Technically, it is possible, but you would need to figure out a way to send the fb-token back to the unity-instance so that our FBconnect-request can use it, and i cannot advise you on how you might accomplish this. Certainly we dont support it out-of-the-box, not do FB.
Sorry about that,
Sean
O
One More Turn
said
almost 7 years ago
The way I'm actually trying to do it is registering the standalone client with a device account then putting that client's game sparks id in a url that opens the facebook web gl client.
Once the user logs in the web gl client, the facebook token string is sent to the standalone client. Then I log the device account out and log into facebook with the retrieved facebook access token string!
Customer Support
said
almost 7 years ago
Yes, that should work. All our FBconnectrequest is going to need is the access token. Once you send that back you should have what you need.
One More Turn
I'm attempting to create a way for unity standalone users to log in / sign up on facebook. Facebook's unity sdk only supports mobile and web.
My plan is to have the user log in on a spin-off web client. The flow is,
Hi One More Turn,
That would all work without issue up to the point where you want to sent responses back to the standalone client from the WebGL client.
The main hurdle here is getting the token, if you could find a way to handle that you could skip the web client step.
As mentioned Facebook do not support this from a desktop client and have not provided an SDK. Everything you want to do is possible with GameSparks but you need to get that token from Facebook.
Once you manage to get the token you can have a look at he following scripts which contain a method of using the token which has worked for some customers in the past.
Cheers.
Oisin
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi One More Turn,
As you mentioned, Facebook auth on a desktop client is not supported by Facebook themselves but I believe there may be paid plugins on the Unity Store that will address that issue. Your primary concern would be getting the auth token from Facebook.
There may be alternatives though, depending on what you have planned for your game.
Let me point you to a few relevant tutorials/documentation that may be useful:
- How to implement external http callbacks
- Unity challenges part-2 facebook login
- Authenticate players using their facebook account
- REST API
Thanks,
Oisin
One More Turn
I think you might have misunderstood me a bit.
Yes, the unity facebook sdk does not support Windows, Mac, and Linux builds. But it does support Web GL.
So, the Windows, Mac, and Linux platforms can open up the web browser to a Web GL spin-off client where facebook works. We then use that web gl client to get all our required info and then send it back to originating Windows / Mac / Linux client.
This is what inspired me but I don't have my own server so I wanted to see if I can use gamesparks solely.
Customer Support
Hi One More Turn,
That would all work without issue up to the point where you want to sent responses back to the standalone client from the WebGL client.
The main hurdle here is getting the token, if you could find a way to handle that you could skip the web client step.
As mentioned Facebook do not support this from a desktop client and have not provided an SDK. Everything you want to do is possible with GameSparks but you need to get that token from Facebook.
Once you manage to get the token you can have a look at he following scripts which contain a method of using the token which has worked for some customers in the past.
Cheers.
Oisin
Customer Support
If you right-click on the images in the post above and open them in a new tab, or choose 'view as image' you should be able to see those examples.
Sean
One More Turn
ah ok so its not possible. The entire plan was to get the token from the web gl to the standalone client.
Guess I can't do it :,(
Thanks for your help though!
Customer Support
Certainly we dont support it out-of-the-box, not do FB.
Sorry about that,
Sean
One More Turn
The way I'm actually trying to do it is registering the standalone client with a device account then putting that client's game sparks id in a url that opens the facebook web gl client.
Once the user logs in the web gl client, the facebook token string is sent to the standalone client. Then I log the device account out and log into facebook with the retrieved facebook access token string!
Customer Support
All our FBconnectrequest is going to need is the access token.
Once you send that back you should have what you need.
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