SHARE
TWEET

Everybody Edits - Login Methods

capasha Mar 12th, 2016 (edited) 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using PlayerIOClient;
  7. namespace test
  8. {
  9.     class Program
  10.     {
  11.         Client client;
  12.  
  13.         static void Main(string[] args)
  14.         {
  15.             LoginMethods("capashaa@gmail.com", "trustno1", 0);
  16.             Console.ReadKey();
  17.  
  18.         }
  19.  
  20.         public static void LoginMethods(string user, string pass, int login)
  21.         {
  22.             switch (login)
  23.             {
  24.                 case 0:
  25.                     PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", user, pass, null, loggedin, faillogin);
  26.                     break;
  27.                 case 1:
  28.                     PlayerIO.QuickConnect.KongregateConnect("everybody-edits-su9rn58o40itdbnw69plyw", user, pass, null, loggedin, faillogin);
  29.                     break;
  30.                 case 2:
  31.                     PlayerIO.QuickConnect.FacebookOAuthConnect("everybody-edits-su9rn58o40itdbnw69plyw", user, null, null, loggedin, faillogin);
  32.                     break;
  33.                 case 3:
  34.                     PlayerIO.Authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "secure", new Dictionary<string, string> { { "userId", user }, { "authToken", pass } }, null, loggedin, faillogin);
  35.                     break;
  36.             }
  37.         }
  38.         public static void loggedin(Client client)
  39.         {
  40.             Console.WriteLine("You are now logged in");
  41.             //Add joining world and stuff like that here.
  42.  
  43.         }
  44.         public static void faillogin(PlayerIOError error)
  45.         {
  46.             Console.WriteLine(error.Message);
  47.         }
  48.     }
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top