title: Open Youtube and Tumblr link in app rather than browser - Unity
body: <p>I've managed to make it so when clicking specific buttons it loads up Facebook, Twitter and Instagram using <code>fb://------</code>, <code>twitter://----</code> and <code>instagram://-----</code>, but I can't seem to find one for YouTube or Tumblr. Is there any way to do this?</p>
  
  <p>Edit: This is my current code. (Sorry for the slow reply)</p>
  
  <pre><code>// Set buttontype in editor depending on which button it is
  // 0 = facebook, 1 = instagram, 2 = tumblr, 3 = twitter, 4 = youtube
  public int buttonType;
  
  // Web urls - use this for computers or if the user doesn't have the app installed on phones
  private string[] webUrls = { 
      "https://www.facebook.com/-------",
      "https://www.instagram.com/--------",
      "http://--------.tumblr.com/",
      "https://twitter.com/----------",
      "https://youtube.com/user/--------"
  };
  
  // Use this for android - loads the app - if don't have the app, default to weburls
  private string[] appUrls = {
      "fb://page/--------",
      "instagram://user?username=---------",
      "http://-------.tumblr.com/",
      "twitter://user?user_id=-------",
      "https://youtube.com/user/--------"
  }; 
  
  void OnMouseDown()
  {
      // Checks which device it's running on - STANDALONE is windows/mac/linux
      #if UNITY_STANDALONE
          Application.OpenURL (webUrls[buttonType]);
      #endif
  
      #if UNITY_ANDROID
          Application.OpenURL (appUrls[buttonType]);
  
          // Do a check to see if they have the app installed
          StartCoroutine(CheckApp());
          launchedApp = false;
      #endif
  
  }
  
  // If switched app, set to true so it won't launch the browser
  void OnApplicationPause()
  {
      launchedApp = true;
  }
  
  IEnumerator CheckApp()
  {
      // Wait for a time
      yield return new WaitForSeconds (waitTime);
  
      // If app hasn't launched, default to opening in browser
      if(!launchedApp)
      {
          Application.OpenURL (webUrls[buttonType]);
      }
  }
  </code></pre>
  
  <p>I simply wait a bit, if the app hasn't launched, I open it in the browser on Android.</p>
  
  <p>Also, the normal YouTube link <em>sometimes</em> asks if you want to open it in the app, not all the time which is quite annoying.</p>
  
  <p><strong>Edit:</strong> After searching for a hell of a long time, I finally found it.</p>
  
  <pre><code>tumblr://x-callback-url/blog?blogName=BLOGNAME
  </code></pre>
  
  <p>The full list of social media that I'll be using are:</p>
  
  <pre><code>fb://page/PAGEIDNUMBER
  instagram://user?username=USERNAME
  tumblr://x-callback-url/blog?blogName=BLOGNAME
  twitter://user?user_id=USERID
  https://youtube.com/user/USERNAME
  </code></pre>
  
  <p>Replace the caps with your specific pages. Hope this helps someone.</p>