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

Posting to FaceBook wall automatically:

Discussion in 'Scripting' started by All_American, Apr 3, 2014.

  1. All_American

    All_American

    Joined:
    Oct 14, 2011
    Posts:
    1,528
    I would like to make a post to the players facebook wall automatically when they hit certain parts of the game.

    I have this code and it works...but it brings up the dialog for the player to make a message and then has to post it themselves.

    How can I make it so the game just does it in the background with no player involvement.

    Code (csharp):
    1. void postButtonClick()
    2.     {
    3.         if (isLogged)
    4.         {
    5.             if (PostScoreAutoEnabled == true)
    6.             {
    7.                 Deck.playerExp = Deck.playerExp + 5;
    8.                 FB.Feed(
    9.                 linkCaption: "I just Made Level " + Deck.playerLevel.ToString() + " with $" + Deck.PlayersScore.ToString("#,###") + ".00, Can you beat it?",
    10.                 picture: "gggggggggggggggggggggggggggggggggggggggggggg",
    11.                 linkName: "ggggggggggggggggggggggggggggg",
    12.                 link: "ggggggggggggggggggggggggggggggggggggggggggg");
    13.             }
    14.         }
    15.     }
     
  2. All_American

    All_American

    Joined:
    Oct 14, 2011
    Posts:
    1,528
    I've searched everywhere trying to get this done and haven't found a single thing.

    Anyone have any suggestions?
     
  3. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Probably a limitation in the FaceBook API.

    As a side note - I'd immediately uninstall your game if it posted to my FaceBook wall without asking me :)
     
  4. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    Facebook wont let that kind of things happen.. all the walls would be full of sh*t after a while.. well, wouldnt change a lot after all..
     
  5. All_American

    All_American

    Joined:
    Oct 14, 2011
    Posts:
    1,528
    Kelso...yeah I didn't mean that, sorry..I had my head up my ares for a second.

    I mean with that feed request, stop it from popping up for the player to type something but just have a message auto-filled and a dialog for the player to allow or disallow the post to the wall.