Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Facebook login via application in Unity3d

Discussion in 'Getting Started' started by VeTaL, Mar 16, 2015.

  1. VeTaL

    VeTaL

    Joined:
    Jul 2, 2012
    Posts:
    125
    I have several builds of the Unity3d game (Dev, Stage), and i have several appropriate Facebook test apps (each of them has different Fb_id).

    When i'm doing Facebook login in the Dev build, my game is closed and Facebook application is opened, so i can log in with 1 click, so i don't need to enter my creds (if i'm already logged in to a Facebook app).

    When i'm doing Facebook login in the Stage build, a Facebook canvas is opened on top of my game, so every time i need to input my creds to login.

    However, it seems the settings are the same for both builds. How can i set Stage build to use Facebook app instead of canvas?

    EDIT: Facebook application is installed in both cases.
     
    Last edited: Mar 17, 2015
  2. VeTaL

    VeTaL

    Joined:
    Jul 2, 2012
    Posts:
    125
    As stated here, there should be a 'FacebookDisplayName' in plist. That was not a real solution, but it pushed me forward.

    The thing is that Fb_id in project settings (stored in FacebookSettings.asset) should equals to the one in plist (FacebookAppId). Otherwise, canvas would be opened for login instead of Facebook app.