RockBaby
RockBaby

Reputation: 381

Integrate Facebook to Xcode 4.3

I encountered some error during facebook integration. Did i configure the Facebook SDK correctly? Please advise.

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_Facebook", referenced from:
      objc-class-ref in SettingView.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I did the following step:

  1. Downloaded latest Facebook SDK (facebook-facebook-ios-sdk-v1.1-11-g07626c3.zip)
  2. Change the build_facebook_ios_sdk_static_lib.sh as the following: XCODEBUILD_PATH=/Developer/usr/bin to: XCODEBUILD_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin
  3. Add the facebook-ios-sdk folder (from the lib folder) to my project
  4. I just type declare the facebook variable and run. It shows me the errors

    facebook = [[Facebook alloc] initWithAppId:@"myAppID" andDelegate:self];

==============================

EDIT: Ok. I have found the solution. I have missed out 1 step which to link against the libfacebook_ios_sdk.a in Xcode

  1. Go to Link Binary with Libraries
  2. Click on Add Other
  3. Add libfacebook_ios_sdk.a

Upvotes: 4

Views: 3250

Answers (1)

RockBaby
RockBaby

Reputation: 381

Ok. I have found the solution. I have missed out 1 step which to link against the libfacebook_ios_sdk.a in Xcode

  1. Go to Link Binary with Libraries
  2. Click on Add Other
  3. Add libfacebook_ios_sdk.a

Upvotes: 3

Related Questions