Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FaceBook and Google+/Google Authentication from Standalone PC/Mac

Discussion in 'Works In Progress - Archive' started by AlexZ, Jun 5, 2012.

  1. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Hey guys,

    Been researching this for many months now on and off. I finally came up with an elegant solution I think.

    It will allow stand alone Unity games to launch a Facebook or Google auth popup browser window and once the login is successful the game will then receive the access token a few seconds later. It will feel identical to mobile and web authentication methods, except the process is a bit different. Will be using the OAuth 2.0.


    Would anyone make use of this if I was to post it up on the asset store?

    This should be useful for games on Steam, Mac App store and Google Chrome App Store. As well as just regular stand alone.

    Ill post a demo when I get it fully working.

    Edit:

    Here are the demo's:

    http://socialplay.com/downloads/ReactionPC.zip

    http://socialplay.com/downloads/ReactionMac.zip

    Thanks!

    Screen Shots of the demo process:





     
    Last edited: Jun 19, 2012
  2. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,869
    That does sound like it would be useful. Though I've never attempted this in a standalone game, I just assumed that using the FB Connect would be a simple matter.

    I look forward to seeing a demo of this.
     
  3. softwizz

    softwizz

    Joined:
    Mar 12, 2011
    Posts:
    793
    As do I...
     
  4. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    So far so good, If all goes well, should have a demo as early as tomorrow. Although I'm not sure how I will show it off since its a stand alone exe, not as easy as web.

    Just thought of an idea. Ill include it in one of my games, as a sort of promotional tool :D
     
  5. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    It works! :)

    Full authentication from stand alone on PC. Going to try Mac next, it should work with no changes.

    Demo coming soon

    Attached is a cube with my profile picture.
     

    Attached Files:

  6. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
    Are you able to authenticate without using web browser?
     
  7. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953

    Love to see this. It would make small games get a larger fan base more quickly because you can advertise online in addition to word of mouth.

    It would need a polished interface, customiseability and easy integration into applications to be successful though.
     
  8. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Hi, no, that was our first thought of doing it without a web popup, but after research into FB policy, it is currently illegal.

    If you notice, all FB authentication on other devices besides PC/Mac, such as Android, and IOS, have a web popup for authentication, with a varying degree of integration or compact-ness. For PC and Mac it is the same idea, except it uses your default browser.


    All:

    I will be posting a link to a download with one of our games that uses our new method for PC/Mac FB authentication some time later today. I was out of the country last week, sorry for the delay.
     
  9. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Last edited: Jun 19, 2012
  10. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
  11. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    You need to authenticate from the web? instead of stand alone? there are many options on the asset store to do that already, including my SocialPlay FB .Net Integrator. Or did you mean something else?

    I looked into the option of using that device implementation, but i think it is more of a hassle to enter in a code into your game, then to login using a popup browser window.
     
  12. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
    No, i did was say that your application test need Call the Web-Brownser to authenticate well like all other applications that i already looked.

    The best model is this new type that i posted, that can be used in any platform:
    http://developers.facebook.com/docs/authentication/devices/

    Because, the application dont need call Web-Brownser.
    Thus the user is free to access the link anywhere and pick up the small code informed by Facebook to put in the application again.
     
  13. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    I see what your saying. But think of it this way, as a user that just wants to login and play, would you rather, manually open your browser page, navigate to the facebook link, copy the code from your game, paste it back into the facebook page, submit it, and then get authenticated?

    Or, would you rather have the browser launch automatically, hit add app, and be authenticated? Its a much simpler process. The code for devices is intended for systems that do not have a keyboard, such as tv's.
     
  14. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
    yes, you is correct, in the Computer i prefer have the browser automatically starting.

    But the Code for Devices is best, because it work to any platform (with or without web-browser), and using the same system. (remembering that this System still dont is working)
     
  15. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Convenient for the developer, not for the user. Probably not a good idea :p

    Also keep in mind, my process works with Google as well, which the device method is only for Facebook.
     
  16. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
  17. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Oh good point, its OAuth 2.0 standard. Well, I will definitely try it when it comes out, but I'm almost certain it wont be as user friendly. If I make some games for smart tv's I will probably use the device method though.
     
  18. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Any more interest? Not sure if I should spend time putting this on the asset store.
     
  19. cjrichards

    cjrichards

    Joined:
    Jun 28, 2012
    Posts:
    2
    Hi AlexZ,
    This looks like a promising project that I'd like to get my hands on. Any idea if it'd work with the Flash build? I ran into a bit of a roadblock trying to pull the auth code into my project from the url that facebook returns, so I have been searching high and low for a solution. If you aren't going to post this in the asset store, could you please at least explain how you achieve this feat?
     
  20. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    It should work for flash, but I will test it. I will most likely be putting it up on the asset store, just finishing up a few more things for google login.
     
  21. renardmf

    renardmf

    Joined:
    Jun 29, 2012
    Posts:
    47
    Can't wait until it's released!
     
  22. wingrider888

    wingrider888

    Joined:
    Oct 27, 2010
    Posts:
    38
    This is awesome! havent found a descent solution for fb integration on the desktop yet. would be great to see it on the asset store, i think it would do well!
     
  23. wingrider888

    wingrider888

    Joined:
    Oct 27, 2010
    Posts:
    38
    Just downloaded the mac version to test it out and for some reason it goes from screenshot 4 to screenshot 1. It never actually eneters the game once its been authenticated. any idea why?
     
  24. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    We took down the server, There wasn't enough demand on it yet to justify polishing it for the store :p But will get to it eventually.
     
  25. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Very interested in this :)
     
  26. vialta

    vialta

    Joined:
    Mar 8, 2013
    Posts:
    1
    Really interested in this. Currently I haven't been able to find any plugin that would make you post something in facebook using social media, that is if you are building for a standalone windows app.
    I think there might be a couple of people interested in this if it comes to the asset store.
     
  27. oferei

    oferei

    Joined:
    Dec 1, 2012
    Posts:
    36
    Seems useful for production, while developing on the PC.
     
  28. oferei

    oferei

    Joined:
    Dec 1, 2012
    Posts:
    36
    btw, how does it communicate with the browser to receive the access token?
     
  29. Drezus

    Drezus

    Joined:
    Oct 14, 2013
    Posts:
    13
    Is this still up and running? I'm really interested in it, specially when you take into account the official Facebook API still won't support standalone apps. I'm looking for a solution like this one for m y company and, even through browser authoring looks like a stretch for me, it seems to be the only legal way to connecting over desktop, at least for the time being. Can you shed some light about this, Alex?
     
  30. S3India

    S3India

    Joined:
    Jul 14, 2014
    Posts:
    3
    Did this work ? i need to implement Facebook in Standalone PC