Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Mohammed Abomedra
665 PointsFacebook login wont open login dialog objective-c
am trying to complete the tutorial for the iOS SDK 3.0 from Facebook and I have an error after pressing (log in with Facebook) button.
0x10b4b9683 <+241>: jmp 0x10b4b95ae ; <+28> at FBSDKInternalUtility.m:491
"Thread 1: Signal SIGABRT"
Mohammed Abomedra
665 PointsThank you Tommy for replaying. What im trying to do is to test the Facebook login button, as they instructed in their dev page. When i run the project, the simulator launches and i can see the button but when i press it, the IDE jumps to the debug navigator and shows me some threads error.
it supposed to launch the browser and show me a login dialog.
0x55d35 <+286>: jmp 0x55c36 ; <+31> at FBSDKInternalUtility.m:491
0x55d1d <+262>: leal 0x3c10b(%esi), %eax
0x39163 <+392>: movl 0x66613(%edi), %ecx
0x395ea <+52>: movl %eax, (%esp)
0x395a3 <+269>: movl -0x10(%ebp), %eax
0x38041 <+312>: movl %edi, (%esp)
0x34207 <+1201>: movl %esi, (%esp)
all with the same error
Thread 1: signal SIGABRT
here's my code
//ViewContoller.m
#import "ViewController.h"
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init];
loginButton.center = self.view.center;
loginButton.readPermissions = @ [@ "email",@ "public_profile"];
[self.view addSubview:loginButton];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
//AppDelegate.m
#import "AppDelegate.h"
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
return YES;
}
I hope im not missing anything
1 Answer
Tommy Choe
38,156 PointsHmm.. did you set up a button IBAction from the Interface Builder to your ViewController file? As far as I can tell, your button really isn't doing anything after you press it.
I would recommend following the instructions provided in this tutorial. Try it out and let me know if it works for you. http://www.appcoda.com/ios-programming-facebook-login-sdk/
Tommy Choe
38,156 PointsTommy Choe
38,156 PointsHey Mohammed, we're gonna need more detail than that to help you out. From what I can tell, that's just giving you a general area where the error occurred.