- Home /
Get Facebook Access Token in unity3d Desktop App
I am new in unity3d and i am trying to create an app with social connect for unity3d desktop app.I read some tutorial like unity-and-facebook. My problem is how to get an access token of user.I follow same steps as i read getting-started on facebook. When facebook-unity package import to my new package and change app id from facebook setting.I am getting a default access token and dummy user logedin.
Sorry for my English.
Answer by brian_jew · Sep 25, 2013 at 12:23 AM
The Facebook SDK is currently not support for Desktop apps. Only iOS, Android and Facebook Canvas.
Is there a way to connect with facebook for a standalone/desktop project ?
Answer by Masaco · Sep 19, 2014 at 08:47 AM
Here's my conclusion after dealing with desktop facebook authentication. Implementing the facebook login and receiving the OAuth tokens inside a unity desktop app can lead to a very fragile and error prone solution. Instead you can use simple and elegant server side approach. You can handle the facebook authorization token exchange on your backend. After that you can authorize the desktop app user by asking the authorization result from your web server.
I found a nice example project that can be used as starting point: http://www.ifc0nfig.com/accessing-facebook-unity-game-2/
I downloaded sample project from http://www.ifc0nfig.com/accessing-facebook-unity-game-2/ .But it showing error SerializationException: Invalid JSON string
Return url is not return any access token value
Your answer
![](https://koobas.hobune.stream/wayback/20220613113724im_/https://answers.unity.com/themes/thub/images/avi.jpg)