I am trying to use Application.OpenURL(); to open a url that on a mobile device brings up the Twitter app and will take it to the post area in Twitter and have pre set text for the user to post which is (I’ve just scored “points” points) but it will not open the url as long as I am trying to add my currentScorefGui.guiText.text to the string I am passing to the Application.OpenURL(); If i remove the custom GUI text it works just fine?
I had this working just find but then yesterday it just stopped working randomly and I have tried so many different methods to get it to work but as long as I am trying to pass that gui text it won’t work? Also the currenScoreGui has a GUI Text game object attached to it.
public GameObject currentScorefGui;
public string currentScoreText;
void Update () {
currentScoreText = "twitter://post?text=I've%20just%20scored%20" + currentScorefGui.guiText.text + "%20points";
}
void OnMouseUp () {
Application.OpenURL(currentScoreText);
Debug.Log("Twitter Button Pressed...");
}