facebook-ios-sdk

FBOpenGraphAction runtime error in Swift

我只是一个虾纸丫 提交于 2019-12-11 10:08:07
问题 I am trying to create a Facebook custom story in my iOS App. I am developing the app in Swift. var graphObject: NSMutableDictionary = FBGraphObject.openGraphObjectForPostWithType( "app: type", title: "new", image: nil, url: nil, description: "description" ) (I am getting a runtime error on the following line) **var graphAction: FBOpenGraphAction = FBGraphObject.graphObject() as FBOpenGraphAction** graphAction.setObject(UIImage(named: "default"), forKey: "image") graphAction.setObject

How to post to user's facebook feed

两盒软妹~` 提交于 2019-12-11 08:47:32
问题 I need to post to user's facebook feed. Based on several other SO questions I came up with the following posting request: let request = GraphRequest(graphPath: "me/feed", parameters: ["message" : "Hello world"], accessToken: accessToken, httpMethod: .POST, apiVersion: GraphAPIVersion.defaultVersion) request.start({ (response, requestResult) in switch requestResult { case .failed(let error): print("error in graph request:", error) case .success(let graphResponse): if let responseDictionary =

Handle pagination of Facebook user photos

旧街凉风 提交于 2019-12-11 03:53:49
问题 I'm working on a feature for an iOS app that will enable its user to pick a photo from their Facebook gallery. I've got the initial request to get the photos working - it does return a small number of photos and a link to the next and previous batches. My problem is I don't know what the right way of handling this pagination is; I spent a long time trying to google it or find an answer in Facebook's documentation but it's simply rubbish (i.e. no help whatsoever). Could you take a look at the

Parse v1.7.4 and Facebook SDK NSInvalidArgumentException', reason: '+[NSData PF_dataFromBase64String:]: unrecognized selector sent to class

拜拜、爱过 提交于 2019-12-11 03:38:20
问题 I get this error, after upgrading both the FB and Parse SDK to the latest versions. I know that this occurs in my app delegate in the method below. I have a mixed swift and objective c application, my delegate is written in Objective C and as I am working to the next version I am converting and writing new classes in Swift. If I comment out the handler below the error does not occur, but i get a login failed message, which is what i would expect. After pressing in the login button the

Facebook iOS SDK Not Calling Completion Handler

亡梦爱人 提交于 2019-12-11 03:36:22
问题 Problem: Using the FB SDK and the method openActiveSessionWithReadPermissions, the completion handler doesn't appear to get called when the app is reopened from Facebook web or Facebook app and I get this error output: FBSDKLog: FBSession INVALID transition from FBSessionStateCreated to FBSessionStateClosed FBSDKLog: FBSession transition from FBSessionStateCreated to FBSessionStateCreatedOpening Context Using Facebook SDK 3.2.1 App is built for iOS 5.0+ Using xCode 4.6.1 Testing on Simulator

IOS Facebook Friend Invite Not Working in facebook sdk

旧巷老猫 提交于 2019-12-11 02:28:10
问题 i m working on project where i require invite facebook friend but notification is not sent in facebook account. NSString *frindId=[[self.checkitem1 objectAtIndex:indexPath.row]valueForKey:@"id"]; NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"Come check out my app.", @"message", frindId, @"to", nil]; [FBWebDialogs presentRequestsDialogModallyWithSession:nil message:[NSString stringWithFormat:@"Come check out my app."] title:@"MyWorkOut" parameters:params

FBFriendPickerViewController is loading a empty tableview intermittently

陌路散爱 提交于 2019-12-11 01:56:49
问题 I am using FBFriendPickerViewController to load friends after user signs in. However, an empty table view is being loaded. The friends of the user from fb are not showing up. Heres the code. - (IBAction)inviteButtonTouchHandler:(id)sender { if (!_friendPickerController) { _friendPickerController = [[FBFriendPickerViewController alloc] initWithNibName:nil bundle:nil]; _friendPickerController.delegate = self; _friendPickerController.title = @"Select friends"; _friendPickerController

presentShareDialogWithParams posts to FB wall, but callback handler results say error

╄→尐↘猪︶ㄣ 提交于 2019-12-11 01:54:27
问题 I've got an iOS app with the Facebook SDK. I'm using the first block of sample code at https://developers.facebook.com/docs/ios/ios-sdk-games/feed/ almost verbatim to share info from my app to FB. I've only changed strings and URLs from the sample code to fit my app. While posts from my app do appear on my Facebook wall and everything looks good, the FBAppCall results in my NSLog are saying, Error publishing story = Error Domain=com.facebook.sdk Code=11 "The user navigated away from the

FBUserSettingsViewController crashes on dismiss

柔情痞子 提交于 2019-12-11 01:47:07
问题 I'm trying to use FBUserSettingsViewController but it's crashing every time I try to dismiss it. I use the following code to display it: FBUserSettingsViewController *userSettings = [[FBUserSettingsViewController alloc] initWithNibName:nil bundle:nil]; userSettings.readPermissions = @[]; userSettings.publishPermissions = @[@"publish_actions"]; userSettings.defaultAudience = FBSessionDefaultAudienceEveryone; userSettings.delegate = self; [self.navigationController pushViewController

Facebook Request Never Gets Executed

淺唱寂寞╮ 提交于 2019-12-11 01:23:26
问题 I am trying to get a user's Facebook Friends who also use the same app. "Time to get other friends that use this app" always prints out But neither the result, nor the error are printed I checked the graph path with Facebook's Graph API explorer, and it worked, but it does not work with my app for some reason. - (void)getFriendsForUser:(NSNotification *)notification { GGUser *theCurrentUser = [notification object]; NSLog(@"Time to get other friends that use this app"); [FBRequestConnection