Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Implement a Facebook Like Button in-game through Unity iOS.

Discussion in 'iOS and tvOS' started by Ben-BearFish, Feb 17, 2012.

  1. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Does anyone know if it is possible to implement a Facebook login and 'Like' button within your iOS Unity developed App and keep track of whether the user already liked you?

    I looked on the Asset Store through the various Facebook plugins, and none of them particularly mentioned whether this was possible or were vague, so I was wondering if anyone had experience implementing this or using any of the plugins, and what I should expect from them.

    The plugins I looked over were:

    iOS Social Networking Plugin by Prime31
    http://u3d.as/content/prime31/i-os-social-networking-plugin/2CZ

    Easy Facebook Integration by Studio Evil
    http://u3d.as/content/studio-evil/easy-facebook-integration/2w8

    Facebook Menu System by iffcom.ch
    http://u3d.as/content/iffcom-ch/facebook-menu-system/1RH

    FB2Unity by Methodized
    http://u3d.as/content/methodized/fb2unity/1X4

    Thank you.
     
    Last edited: Feb 21, 2012
  2. rhys_vdw

    rhys_vdw

    Joined:
    Mar 9, 2012
    Posts:
    101
    Hi, did you ever get this to work? I've go to do the same thing now and I'd love some advice on which library to use.
     
  3. StoneFish

    StoneFish

    Joined:
    Aug 26, 2012
    Posts:
    123
    +1 here
     
  4. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Last edited: Jan 18, 2013
  5. nocanwin

    nocanwin

    Joined:
    May 7, 2009
    Posts:
    176
    The easiest way I've found is to try and open the fb app to your page. If it doesn't open then open your page using the browser. I wish there was a way to do it without leaving the app. Oh well.

    Application.OpenURL("fb://profile/#############");//replace the #'s with your profile id
    Application.OpenURL("http://www.facebook.com/mypage");
     
  6. gurdotan

    gurdotan

    Joined:
    Feb 6, 2013
    Posts:
    15
    SOOMLA has all the features you're looking for implemented for Facebook, as well as Twitter and Google+. The plugin is called SOOMLA Profile and is free on the asset store:
    https://www.assetstore.unity3d.com/en/#!/content/24601

    Specifically for the things you requested, the APIs are:
    • Login: SoomlaProfile.Login(Provider.FACEBOOK, null, coinsReward);
    • Like: SoomlaProfile.Like(Provider.FACEBOOK, "your.facebook.page");
    Keeping track of whether a user liked you or not is not possible, the Facebook API limits this and requires the user to actually enter the web page.

    For full disclosure, I'm one of the founders. Feel free to reach me directly on Twitter.
     
    onebird likes this.