public VKLoginWindow(String appId, VKAuthScope[] scope)
 {
     InitializeComponent();
     Uri uri = AuthHelper.GetAuthUri(appId, scope, VKAuthDisplay.popup);
     webBrowser.Navigated += new System.Windows.Navigation.NavigatedEventHandler(webBrowser_Navigated);
     webBrowser.Navigate(uri);
 }
Beispiel #2
0
 public static Uri GetAuthUri(String appId, VKAuthScope[] scope, VKAuthDisplay display)
 {
     return new Uri(GetAuthString(appId, scope, display), UriKind.Absolute);
 }
Beispiel #3
0
 public static String GetAuthString(String appId, VKAuthScope[] scope, VKAuthDisplay display)
 {
     return String.Format(@"http://oauth.vkontakte.ru/authorize?client_id={0}&scope={1}&display=popup&response_type=token", appId, String.Join(",", scope.Select(s => s.GetOverridenString())));
 }