public void ShareOnTwitter() { if (SoomlaProfile.IsLoggedIn(Provider.TWITTER)) { SoomlaProfile.UpdateStory( Provider.TWITTER, "I'm playing this awesome game!", null, null, null, "www.mccarthy.tech", null, null, null ); } else { if (SceneManager.GetActiveScene().name == "menu") { MenuController.instance.NotificationMessage("Please Connect In Order To Post"); } } }
public void BtnPostClicked() { if (!FB.IsLoggedIn) { return; } SoomlaProfile.UpdateStory(Provider.FACEBOOK, "This is a Treasure Chest test message!", "Huzzah!", "Caption", "Description", "", "http://www.alansjourney.com/wp-content/uploads/2015/02/Oh-Hell-Yeah.png"); }
public void UpdateTwitterStory() { Debug.Log("Share button clicked. Login status: " + SoomlaProfile.IsLoggedIn(Provider.TWITTER)); if (!SoomlaProfile.IsLoggedIn(Provider.TWITTER)) { SoomlaProfile.Login(Provider.TWITTER); ProfileEvents.OnLoginFinished += (UserProfile userProfile, bool autologin, string payload) => { //Your code to execute here Debug.Log("onloginfinished Logged into " + userProfile.Provider + " username: "******"", null); CloseSharePopup(); }
// Post to Twitter public void postToTwitter() { SoomlaProfile.UpdateStory( Provider.TWITTER, "Scored 1000 points in Snake and Tails!", // Message "Red Tape Studios", // Name "RTS FTW!", // Caption "rts_snake_tails", // Desc "https://play.google.com/store/apps/details?id=com.RedTapeStudios.MatchMayhem_01&hl=en", // Link "https://lh3.googleusercontent.com/VZA4sJmj4Gw1SHzJQJredvGtQeDbUzMdyGykSA1MJW35yWN1-06ve6YuED_sbV1u2a4=h900-rw", // Image "twitter" ); swap_to_twitter_posted_img(); }
/// <summary> /// Opens this <c>Gate</c> by posting the associated story. /// </summary> /// <returns>If the story was successfully posted returns <c>true</c>; otherwise /// <c>false</c>.</returns> protected override bool openInner() { if (CanOpen()) { SoomlaProfile.UpdateStory(Provider, Message, StoreName, Caption, Link, ImgUrl, this.ID); return(true); } return(false); }
//intenta crear un feed/mensaje en el muro del usuario logeado en facebook, usando soomla public void makeFBFeed() { if (isloggedFB()) { SoomlaProfile.UpdateStory( Provider.FACEBOOK, "Check out this great game: OMF", "OMF: SurfRescue!", "OMF is amazing!", "omf game from electroplasmatic games", "https://www.facebook.com/ohmyfrog.surfrescue", "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/p160x160/10665697_304545143067074_11542050484542634_n.jpg?oh=00b8a665b3f03bd5f4b2a00ab4c2bed2&oe=554BBF35&__gda__=1435501571_ea7f4a4e8eeeb811ceff4a73a31ce8e1", string.Empty, null); } else { Debug.LogWarning("No esta logeado en FB"); tryLoginFB(); } }
public void ShareOnTwitter() { if (SoomlaProfile.IsLoggedIn(Provider.TWITTER)) { SoomlaProfile.UpdateStory( Provider.TWITTER, "All your base are belong to us", null, null, null, "WWW.link.com", null, null, null ); } else if (SceneManager.GetActiveScene().name == "MainMenu") { MenuController.instance.NotificationMessage("Please connect in order to post"); } }
public void ShareOnTwitter() { if (SoomlaProfile.IsLoggedIn(Provider.TWITTER)) { SoomlaProfile.UpdateStory( Provider.TWITTER, "Im Playing This Awesome Game " + Random.Range(0, 100), null, null, null, null, "www.Link.com", null, null ); } else { if (Application.loadedLevelName == "MainMenu") { MenuController.instance.NotificationMessage("Please Connect In Order To Post"); } } }
/// <summary> /// Displays the welcome screen of the game. /// </summary> void welcomeScreen() { Color backupColor = GUI.color; float vertGap = 80f; //drawing background, just using a white pixel here GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), tBackground); GUI.DrawTexture(new Rect(0, 0, Screen.width, timesH(240f)), tShed, ScaleMode.StretchToFill, true); float rowsTop = 300.0f; float rowsHeight = 120.0f; GUI.DrawTexture(new Rect(timesW(65.0f), timesH(rowsTop + 10f), timesW(516.0f), timesH(102.0f)), tBGBar, ScaleMode.StretchToFill, true); if (SoomlaProfile.IsLoggedIn(targetProvider)) { GUI.skin.button.normal.background = tShare; GUI.skin.button.hover.background = tShare; GUI.skin.button.active.background = tSharePress; if (GUI.Button(new Rect(timesW(50.0f), timesH(rowsTop), timesW(212.0f), timesH(120.0f)), "")) { SoomlaProfile.UpdateStatus(targetProvider, "I LOVE SOOMLA ! http://www.soom.la", null, exampleReward); } } else { GUI.DrawTexture(new Rect(timesW(50.0f), timesH(rowsTop), timesW(212.0f), timesH(120.0f)), tShareDisable, ScaleMode.StretchToFill, true); } GUI.color = Color.black; GUI.skin.label.font = fgoodDog; GUI.skin.label.fontSize = 30; GUI.skin.label.alignment = TextAnchor.MiddleCenter; GUI.Label(new Rect(timesW(270.0f), timesH(rowsTop), timesW(516.0f - 212.0f), timesH(120.0f)), "I Love SOOMLA!"); GUI.color = backupColor; rowsTop += vertGap + rowsHeight; GUI.DrawTexture(new Rect(timesW(65.0f), timesH(rowsTop + 10f), timesW(516.0f), timesH(102.0f)), tBGBar, ScaleMode.StretchToFill, true); if (SoomlaProfile.IsLoggedIn(targetProvider)) { GUI.skin.button.normal.background = tShareStory; GUI.skin.button.hover.background = tShareStory; GUI.skin.button.active.background = tShareStoryPress; if (GUI.Button(new Rect(timesW(50.0f), timesH(rowsTop), timesW(212.0f), timesH(120.0f)), "")) { SoomlaProfile.UpdateStory(targetProvider, "The story of SOOMBOT (Profile Test App)", "The story of SOOMBOT (Profile Test App)", "SOOMBOT Story", "DESCRIPTION", "http://about.soom.la/soombots", "http://about.soom.la/wp-content/uploads/2014/05/330x268-spockbot.png", null, exampleReward); } } else { GUI.DrawTexture(new Rect(timesW(50.0f), timesH(rowsTop), timesW(212.0f), timesH(120.0f)), tShareStoryDisable, ScaleMode.StretchToFill, true); } GUI.color = Color.black; GUI.skin.label.font = fgoodDog; GUI.skin.label.fontSize = 25; GUI.skin.label.alignment = TextAnchor.MiddleCenter; GUI.Label(new Rect(timesW(270.0f), timesH(rowsTop), timesW(516.0f - 212.0f), timesH(120.0f)), "Full story of The SOOMBOT!"); GUI.color = backupColor; rowsTop += vertGap + rowsHeight; GUI.DrawTexture(new Rect(timesW(65.0f), timesH(rowsTop + 10f), timesW(516.0f), timesH(102.0f)), tBGBar, ScaleMode.StretchToFill, true); if (SoomlaProfile.IsLoggedIn(targetProvider)) { GUI.skin.button.normal.background = tUpload; GUI.skin.button.hover.background = tUpload; GUI.skin.button.active.background = tUploadPress; if (GUI.Button(new Rect(timesW(50.0f), timesH(rowsTop), timesW(212.0f), timesH(120.0f)), "")) { // string fileName = "soom.jpg"; // string path = ""; // // #if UNITY_IOS // path = Application.dataPath + "/Raw/" + fileName; // #elif UNITY_ANDROID // path = "jar:file://" + Application.dataPath + "!/assets/" + fileName; // #endif // // byte[] bytes = File.ReadAllBytes(path); // SoomlaProfile.UploadImage(targetProvider, "Awesome Test App of SOOMLA Profile!", fileName, bytes, 10, null, exampleReward); SoomlaProfile.UploadCurrentScreenShot(this, targetProvider, "Awesome Test App of SOOMLA Profile!", "This a screenshot of the current state of SOOMLA's test app on my computer.", null); } } else { GUI.DrawTexture(new Rect(timesW(50.0f), timesH(rowsTop), timesW(212.0f), timesH(120.0f)), tUploadDisable, ScaleMode.StretchToFill, true); } GUI.color = Color.black; GUI.skin.label.font = fgoodDog; GUI.skin.label.fontSize = 28; GUI.skin.label.alignment = TextAnchor.MiddleCenter; GUI.Label(new Rect(timesW(270.0f), timesH(rowsTop), timesW(516.0f - 212.0f), timesH(120.0f)), "Current Screenshot"); GUI.color = backupColor; if (SoomlaProfile.IsLoggedIn(targetProvider)) { GUI.skin.button.normal.background = tLogout; GUI.skin.button.hover.background = tLogout; GUI.skin.button.active.background = tLogoutPress; if (GUI.Button(new Rect(timesW(20.0f), timesH(950f), timesW(598.0f), timesH(141.0f)), "")) { SoomlaProfile.Logout(targetProvider); } } else if (isInit) { GUI.skin.button.normal.background = tConnect; GUI.skin.button.hover.background = tConnect; GUI.skin.button.active.background = tConnectPress; if (GUI.Button(new Rect(timesW(20.0f), timesH(950f), timesW(598.0f), timesH(141.0f)), "")) { //SoomlaProfile.GetLeaderboards(Provider.GAME_CENTER); SoomlaProfile.Login(targetProvider, null, exampleReward); } } }