social-framework

Handle ACAccountStoreDidChangeNotification for Facebook & Twitter in iOS 6+

淺唱寂寞╮ 提交于 2019-12-08 06:24:07
问题 I am using Social framework for Facebook & Twitter integration. For this I followed this link Everything is working fine except when I app receives ACAccountStoreDidChangeNotification , it crashes. App crashes when 1) I installed app for first time & user don't have Facebook / Twitter account configured in Settings. 2) When I call any method of Facebook / Twitter , it gives me error code 6 as I don't have account configured which is right. 3) I click on HOME button so my app enters background

How to get Email param of facebook using SLRequest in iOS Social Framework

故事扮演 提交于 2019-12-07 16:41:09
问题 I tried the below code for getting email of the person who logged in iOS Settings Facebook. Please help me how to get email from SLRequest. - (void) getMyDetails { if (! _accountStore) { _accountStore = [[ACAccountStore alloc] init]; } if (! _facebookAccountType) { _facebookAccountType = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; } NSDictionary *options = @{ ACFacebookAppIdKey: FB_APP_ID }; [_accountStore requestAccessToAccountsWithType:

How to get Email param of facebook using SLRequest in iOS Social Framework

馋奶兔 提交于 2019-12-06 02:25:58
I tried the below code for getting email of the person who logged in iOS Settings Facebook. Please help me how to get email from SLRequest. - (void) getMyDetails { if (! _accountStore) { _accountStore = [[ACAccountStore alloc] init]; } if (! _facebookAccountType) { _facebookAccountType = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; } NSDictionary *options = @{ ACFacebookAppIdKey: FB_APP_ID }; [_accountStore requestAccessToAccountsWithType: _facebookAccountType options: options completion: ^(BOOL granted, NSError *error) { if (granted) { NSArray

In iOS 6, check if a person is logged in to a social network?

邮差的信 提交于 2019-12-05 17:35:23
Is there a way to check if a user actually is logged in to facebook or twitter in the operating system. The reason I want to do this is to fall back on sharing in the application by for example using facebooks SDK instead to share, without asking the user to log in again. I actually thought that the code: [SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]; did exactly that, but apparently it only shows an alert if the user has not logged in. This only occurs when the user does not have the Facebook app installed, is not logged in the operating system (in the settings),

Fetching basic information (id, first_name) from Facebook by using Social Framework - source code and screenshots attached

非 Y 不嫁゛ 提交于 2019-12-04 15:58:16
For what would be a word game later I am trying to fetch very basic information about a player by using Social framework: id first_name gender location (i.e. nothing sensitive like email and I don't use Facebook iOS SDK). So in Xcode 5.0.2 I create a blank single view app for iPhone and add Social.framework to the Build phases tab. Then I add the following code to the ViewController.m : #import "ViewController.h" #import <Social/Social.h> #import <Accounts/Accounts.h> #define FB_APP_ID @"432298283565593" //#define FB_APP_ID @"262571703638" @interface ViewController () @property (strong,

Social framework returns “(#803) Cannot query users by their username (username)” when trying to get user feed

ε祈祈猫儿з 提交于 2019-12-04 05:39:29
I'm using iOs social framework in order to retrieve facebook feeds from a certain user. For that purpose, after authenticating I'm doing the following: NSURL *requestURL = [NSURL URLWithString:@"https://graph.facebook.com/username"]; SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:requestURL parameters:nil]; request.account = self.facebookAccount; [request performRequestWithHandler:^(NSData *data, NSHTTPURLResponse *response, NSError *error) { ... }]; The response returns: error = { code = 803; message = "(#803) Cannot query

iOS 6 Social framework not going to settings or no alert

拥有回忆 提交于 2019-12-03 23:36:19
I'm trying to implement the new social framework in iOS6, and have it working, except for 2 weird problems. If I've enabled the services I'm interested in (say... FaceBook), then it works fine. However, if the accounts are deleted from the settings panel (let's say FaceBook, to be consistent), then I get differing, and frustrating behaviors in the simulator and the device. Here's the relevant code in my view controller: //Method for FaceBook - (IBAction)doFacebook:(id)sender{ //check to see if facebook account exists if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]

Get Facebook uid from ACAccountStore in iOS?

我的梦境 提交于 2019-12-03 13:05:47
Hi i want to get the Facebook user's UID from ACAccountStore in iOS 6 self.accountStore = [[ACAccountStore alloc]init]; ACAccountType *FBaccountType= [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; NSString *key = @"01234567890123"; NSDictionary *dictFB = [NSDictionary dictionaryWithObjectsAndKeys:key,ACFacebookAppIdKey,@[@"email"],ACFacebookPermissionsKey, nil]; [self.accountStore requestAccessToAccountsWithType:FBaccountType options:dictFB completion: ^(BOOL granted, NSError *e) { if (granted) { NSArray *accounts = [self.accountStore

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

Share videos on Twitter via iOS App

与世无争的帅哥 提交于 2019-12-02 20:58:47
Is it possible to share a video using SLRequest ? I'm able to share Images using the same SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:requestURL parameters:message]; if (isImage) { NSData *data = UIImagePNGRepresentation(imgSelected); [postRequest addMultipartData:data withName:@"media" type:@"image/png" filename:@"TestImage.png"]; } postRequest.account = account; [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { if (!error) { NSLog(@"Upload Sucess !"); } }];