public void CheckSocialAccountAuthorizationStatus(NSString accountTypeIdentifier) { if (accountStore == null) { accountStore = new ACAccountStore(); } ACAccountType socialAccount = accountStore.FindAccountType(accountTypeIdentifier); DataClass dataClass; if (accountTypeIdentifier == ACAccountType.Facebook) { dataClass = DataClass.Facebook; } else if (accountTypeIdentifier == ACAccountType.Twitter) { dataClass = DataClass.Twitter; } else if (accountTypeIdentifier == ACAccountType.SinaWeibo) { dataClass = DataClass.SinaWeibo; } else { dataClass = DataClass.TencentWeibo; } ShowAlert(dataClass, socialAccount.AccessGranted ? "granted" : "denied"); }
void RequestTencentWeiboAccess() { ACAccountType tencentWeiboAccount = accountStore.FindAccountType(ACAccountType.TencentWeibo); AccountStoreOptions options = new AccountStoreOptions(); options.TencentWeiboAppId = "MY_ID"; SocialNetworkPrivacyController.accountStore.RequestAccess(tencentWeiboAccount, options, (s, e) => CheckAccess()); }
public Task RequestAccess() { AccountStoreOptions options = GetOptions(); ACAccountType account = accountStore.FindAccountType(socialNetwork); var tcs = new TaskCompletionSource <object> (); accountStore.RequestAccess(account, options, (granted, error) => tcs.SetResult(null)); return(tcs.Task); }
public void RequestSinaWeiboAccess() { if (accountStore == null) { accountStore = new ACAccountStore(); } ACAccountType sinaWeiboAccount = accountStore.FindAccountType(ACAccountType.SinaWeibo); accountStore.RequestAccess(sinaWeiboAccount, null, delegate(bool granted, NSError error) { ShowAlert(DataClass.SinaWeibo, granted ? "granted" : "denied"); }); }
public void RequestTwitterAccess() { if (accountStore == null) { accountStore = new ACAccountStore(); } ACAccountType twitterAccount = accountStore.FindAccountType(ACAccountType.Twitter); accountStore.RequestAccess(twitterAccount, null, delegate(bool granted, NSError error) { ShowAlert(DataClass.Twitter, granted ? "granted" : "denied"); }); }
void RequestFacebookAccess() { ACAccountType facebookAccount = accountStore.FindAccountType(ACAccountType.Facebook); AccountStoreOptions options = new AccountStoreOptions() { FacebookAppId = "MY_CODE" }; options.SetPermissions(ACFacebookAudience.Friends, new [] { "email", "user_about_me" }); SocialNetworkPrivacyController.accountStore.RequestAccess(facebookAccount, options, (s, e) => CheckAccess()); }
public static Task<bool> RequestAccessAsync (this ACAccountStore store, ACAccountType accountType, AccountStoreOptions options) { TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool> (); store.RequestAccess (accountType, options, delegate (bool granted, NSError error) { if (error != null) { tcs.SetException (new NSErrorException (error)); } else { tcs.SetResult (granted); } }); return tcs.Task; }
public void RequestTencentWeiboAccess() { if (accountStore == null) { accountStore = new ACAccountStore(); } ACAccountType tencentWeiboAccount = accountStore.FindAccountType(ACAccountType.TencentWeibo); AccountStoreOptions options = new AccountStoreOptions(); options.TencentWeiboAppId = "MY_ID"; accountStore.RequestAccess(tencentWeiboAccount, options, delegate(bool granted, NSError error) { ShowAlert(DataClass.TencentWeibo, granted ? "granted" : "denied"); }); }
public static Task <bool> RequestAccessAsync(this ACAccountStore store, ACAccountType accountType, AccountStoreOptions options) { TaskCompletionSource <bool> tcs = new TaskCompletionSource <bool> (); store.RequestAccess(accountType, options, delegate(bool granted, NSError error) { if (error != null) { tcs.SetException(new NSErrorException(error)); } else { tcs.SetResult(granted); } }); return(tcs.Task); }
public void RequestFacebookAccess() { if (accountStore == null) { accountStore = new ACAccountStore(); } ACAccountType facebookAccount = accountStore.FindAccountType(ACAccountType.Facebook); AccountStoreOptions options = new AccountStoreOptions() { FacebookAppId = "MY_CODE" }; options.SetPermissions(ACFacebookAudience.Friends, new [] { "email", "user_about_me" }); accountStore.RequestAccess(facebookAccount, options, delegate(bool granted, NSError error) { ShowAlert(DataClass.Facebook, granted ? "granted" : "denied"); }); }
void RequestSinaWeiboAccess() { ACAccountType sinaWeiboAccount = accountStore.FindAccountType(ACAccountType.SinaWeibo); SocialNetworkPrivacyController.accountStore.RequestAccess(sinaWeiboAccount, null, (s, e) => CheckAccess()); }
void RequestTwitterAccess() { ACAccountType twitterAccount = accountStore.FindAccountType(ACAccountType.Twitter); SocialNetworkPrivacyController.accountStore.RequestAccess(twitterAccount, null, (s, e) => CheckAccess()); }
protected override string CheckAccess() { ACAccountType socialAccount = accountStore.FindAccountType(socialNetwork); return(socialAccount.AccessGranted ? "granted" : "denied"); }
/// <summary> U3DXT internal. </summary> protected DirectRequestService(string accountType, string serviceType) { _service = new ACAccountStore(); _accountType = _service.FindAccountType(accountType); _serviceType = serviceType; }
public string CheckSocialAccountAuthorizationStatus(string accountTypeIdentifier) { ACAccountType socialAccount = accountStore.FindAccountType(accountTypeIdentifier); return(socialAccount.AccessGranted ? "granted" : "denied"); }