facebook-ios-sdk

Any way to have completionHandler style syntax using [facebook authorize] on iOS 5?

孤者浪人 提交于 2019-12-06 23:12:31
The code below is trying to lazy login to Facebook right before posting a photo, but has an asynchronous problem. In the logs, the after isSessionValid block will appear before the fbDidLogin and then a facebookErrDomain error 10000 will happen ("OAuthException", "active access token must be used", etc). MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate]; if (![appDelegate.facebook isSessionValid]) { [appDelegate.facebook authorize:[NSArray arrayWithObjects:@"publish_stream", @"user_photos", nil]]; } NSLog(@"after isSessionValid block"); NSData

FBSDKLoginManager: undefined symbols for architecture x86_64 + linker command failed with exit code 1

浪尽此生 提交于 2019-12-06 20:49:16
问题 I just upgraded Facebook iOS SDK to v.4.0.1 and I got these errors: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FBSDKLoginManager", referenced from: objc-class-ref in Controller1.o objc-class-ref in AppDelegate.o objc-class-ref in Controller2.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) I already tried to change linkers: with -all_load I get the same error, while with -force_load it becomes "ld:

How to tag friends in startWithGraphPath Facebook iOS

风格不统一 提交于 2019-12-06 17:01:05
问题 I can't seem to get my posts to work using the Facebook SDK for iOS. I am using the "startWithGraphPath:parameters:HTTPMethod:completionHandler:" function. I can get the message, place, and picture working but I can't seem to tag friends. I have tried setting the NSDictionary key and object to parameters[@"tags"] = self.friendsIDs; which is a string of comma separated Facebook User ID's (per the Facebook reference page: https://developers.facebook.com/docs/reference/api/user/#posts). However

Share screenshot on Facebook

喜欢而已 提交于 2019-12-06 13:37:17
问题 I am using the following code to take a screenshot on my iPhone and save it to the photo album. What I would like is a share button to automatically send this screenshot and to Facebook. Does anyone have any ideas how to implement? - (UIImage*)captureView:(UIView *)view { CGRect rect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); [view.layer renderInContext:context]; UIImage *img =

Random Facebook iOS SDK auth token invalidated by API

懵懂的女人 提交于 2019-12-06 12:03:12
问题 I randomly get the following message when trying to access the graph from my iPhone using Facebook iOS SDK: response string: {"error":{"type":"OAuthException","message":"Error validating access token: The session was invalidated explicitly using an API call."}} I'm not sure why this is because I call the graph immediately after I login, so the token should be valid. Also, this happens randomly around 30% of the time. Does anyone know how to go about debugging this issue? 回答1: I've been

Handle invalid accessToken with FBSession openActiveSessionWithReadPermissions in Facebook iOS 3.1.1 SDK

空扰寡人 提交于 2019-12-06 11:42:11
问题 Before anything, I have read both this and this questions to solve the problem below and before asking. My problem is that when the accessToken gets expired (either because the expiration date passes, or manually by deleting the app from my Facebook's App Center) the following code: if ([[FBSession activeSession] isOpen]) { //do something } else { [FBSession openActiveSessionWithReadPermissions:nil allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error)

How to relaunch an app like facebook-ios-sdk does?

↘锁芯ラ 提交于 2019-12-06 11:19:16
Question: I am actively looking in the source code on Github's facebook-ios-sdk project myself but I was wondering if anyone already knows how to relaunch an app that sent an iPhone user to Safari, such that the user can come back after some work has been finished? Example: When using facebook to login, the original app is relaunched after the facebook login page has authenticated the user. Motivation: I would like to be able to do the same for youtube videos without having to completely lose the user. I don't want to use the standard webview approach because I don't want to provide extra

Facebook SDK 3.6 Open Graph Error Message

余生颓废 提交于 2019-12-06 10:23:36
问题 Im trying to use the new Share Dialog and it works fine when the facebook app is not installed and im sharing with my own viewcontroller: if (!call) { // Fallback to customized share UI MyShareViewController *viewController = [[MyShareViewController alloc] initWithItem:object objectType:@"objecttype" actionType:@"namespace:action"]; [_delegate showFallbackShareDialog:viewController]; } So this code only gets called when the facebook app isnt installed. When it is installed the device opens

FBAudienceNetwork : FBMediaView freeze ui when displaying video

空扰寡人 提交于 2019-12-06 08:35:01
When I do this code, the FbMediaView is like loading the ads video on the main thread but it's not freezing when displaying an image. I don't understand why ? let nativeAd = self.adsManager.nextNativeAd() let cell : AdHomeCell? = self.collectionView!.dequeueReusableCellWithReuseIdentifier("AdHomeCell", forIndexPath: indexPath) as? AdHomeCell cell?.createForAd(nativeAd) nativeAd?.registerViewForInteraction(cell!, withViewController: self) return cell I have the latest Facebook SDK (4.8.0) The Audience Network iOS SDK uses AVFoundation internally to play video ads. Initializing an AVAsset does a

undeclared identifier 'FBAppCall' 'FBDialogs'

我们两清 提交于 2019-12-06 07:43:13
I'm recently trying to update the Facebook SDK on our application. I had no worries following the steps fom the Upgrade guide by Facebook. I was able to compile without issues. However, when I quit XCode, reopen my project and try to recompile I get an error about ' FBAppCall ' (undeclared identifier). All others classes from the SDK are working except this one and ' FBDialogs '. I am able to solve those errors by deleting the Facebook framework and adding it again. But I must do it every time I quit XCode. I've tried to check or uncheck " Copy items into destination group's folder (if needed)