acaccount

iOS: user's full name for an ACAccountTypeIdentifierFacebook

孤者浪人 提交于 2020-01-23 17:50:08
问题 I'm using the Facebook integration of iOS to allow user to sign in with their Facebook account. I encountered a problem getting the user's full name. I'm creating an ACAccount of type ACAccountTypeIdentifierFacebook . After some searching I found out this little snippet to get the full name: // account is an ACAccount instance NSDictionary *properties = [account valueForKey:@"properties"]; NSString *fullName = properties[@"fullname"]; I tested it, and it worked. It worked on several devices.

Getting error ACErrorPermissionDenied (error code 7) for Facebook when using Social Framework

﹥>﹥吖頭↗ 提交于 2020-01-02 04:38:26
问题 I am fetching the user’s Facebook account ID and name using ACAccountStore . When an alert comes up asking the user for permission (“XYZ would like to access your news feed and profile”) and the user taps on “Don’t Allow”, I get error code 7, i.e ACErrorPermissionDenied . But after that, if I go to Settings and switch on the Facebook settings for my app and back in the app the alert pops up again and the user taps on “OK”, I’m still getting error code 7 ( ACErrorPermissionDenied ). So it’s

When should I renew an ACAccount? Or, how to check if the credential is expired. (Facebook)

霸气de小男生 提交于 2019-12-21 21:35:58
问题 Recently I was assigned to survey how to use iOS framework ACAccount and Social to implement facebook post function. It is quite simple to gain access of the account configured in setting. if(!_accountStore) _accountStore = [[ACAccountStore alloc] init]; ACAccountType *facebookTypeAccount = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; // Check if there is any faceboook account NSArray *accounts = [_accountStore accountsWithAccountType

Login with twitter in ios 7

给你一囗甜甜゛ 提交于 2019-12-20 17:31:12
问题 I am doing login functionality. In which - user will give twitter email id to login and if login gets succeeded, my app will navigate user to its inner screen of my app. If user has configured twitter account from user's device ios settings. My app takes user's email id from there and it will navigate into second screen of my app. If user has not configured twitter account from ios settings then, if user tapps a button login with twitter from my app login screen, it will navigate user to the

ACAccountCredential returns null for oauthToken

别等时光非礼了梦想. 提交于 2019-12-12 11:44:07
问题 I am getting access to user's facebook via: [accStore requestAccessToAccountsWithType:fbAccountType options:options completion:^(BOOL granted, NSError *error) { if (granted) { // If access granted, then get the Facebook account info NSArray *accounts = [accStore accountsWithAccountType:fbAccountType]; ACAccount *acc = [accounts lastObject]; // Get the access token, could be used in other scenarios ACAccountCredential *fbCredential = [acc credential]; NSString *accessToken = [fbCredential

Twitter account created with tokens fails on iOS7

南笙酒味 提交于 2019-12-11 02:04:52
问题 I am working on an app running on iOS6/7, with custom views to post on Twitter. To improve user experience, if no system accounts are available, I would present the user with a webview to enter their credentials , store them in the ACAccountStore as suggested in ACAccountCredential.h and use it to post. It works great on iOS6 but on iOS7 sharing fails with 401 error . The weird thing is that the account is saved with no errors in the ACAccountStore and can be used by the Twitter app to read

iOS: user's full name for an ACAccountTypeIdentifierFacebook

女生的网名这么多〃 提交于 2019-12-08 20:25:31
I'm using the Facebook integration of iOS to allow user to sign in with their Facebook account. I encountered a problem getting the user's full name. I'm creating an ACAccount of type ACAccountTypeIdentifierFacebook . After some searching I found out this little snippet to get the full name: // account is an ACAccount instance NSDictionary *properties = [account valueForKey:@"properties"]; NSString *fullName = properties[@"fullname"]; I tested it, and it worked. It worked on several devices. Then we've send it to our client, he installed it, and it didn't work. After a few days of testing, I

Why I get this error when saving Twitter ACAccount?

孤者浪人 提交于 2019-12-08 02:53:42
问题 I'm trying to save a Twitter account into the ACAccountStore . I'm authenticating the user with MPOauth (this works perfectly, I can authenticate and post a message) and when I receive the access token and the access token secret I proceed to save the account. First of all, I split the token access for taking only the token itself, not the user ID. After that this is my code if ([username length] > 0 && [token length] > 0 && [secret length] > 0) { ACAccountStore *accountStore = [

When should I renew an ACAccount? Or, how to check if the credential is expired. (Facebook)

孤街浪徒 提交于 2019-12-04 17:09:26
Recently I was assigned to survey how to use iOS framework ACAccount and Social to implement facebook post function. It is quite simple to gain access of the account configured in setting. if(!_accountStore) _accountStore = [[ACAccountStore alloc] init]; ACAccountType *facebookTypeAccount = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; // Check if there is any faceboook account NSArray *accounts = [_accountStore accountsWithAccountType:facebookTypeAccount]; if (![accounts count]) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"alert" message:@

Login with twitter in ios 7

你说的曾经没有我的故事 提交于 2019-12-03 04:05:55
I am doing login functionality. In which - user will give twitter email id to login and if login gets succeeded, my app will navigate user to its inner screen of my app. If user has configured twitter account from user's device ios settings. My app takes user's email id from there and it will navigate into second screen of my app. If user has not configured twitter account from ios settings then, if user tapps a button login with twitter from my app login screen, it will navigate user to the twitter page from where user has to give email id (twitter id) and password and if login is successful