Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Facebook Connect for iPhone using xcode 4

I'm having trouble getting Facebook Connect working. I (attempt) to follow the instructions located at http://www.mobisoftinfotech.com/blog/iphone/iphone-fbconnect-facebook-connect-tutorial/ but it seems to be for earlier versions of xcode. Here are the steps I'm taking.

  • Create a new View Based App
  • Download the SDK from their link
  • Copy the FBxxxx.h files from the FBConnect folder inside of the src folder into my projects directory
  • Create a new group named FBConnect under my project in xcode
  • right click add new files and select the files that are already within my project
  • go through the rest of the steps on the page creating an application and writing the example code

It seems that I've set everything up correct then I get the follow error when I build my project.

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in JetPackViewController.o
  "_OBJC_CLASS_$_FBLoginButton", referenced from:
      objc-class-ref in JetPackViewController.o
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in JetPackViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

I'm assuming this has something to do with how I am importing the files into my project. So how do I fix this or what am I doing wrong?

like image 461
Jason Avatar asked Feb 24 '26 07:02

Jason


2 Answers

The Facebook Connect SDK has been deprecated. Pull down the Facebook iOS SDK from Github. It comes with a working example and all you need to do is replace your appId in two places. If you run into issues upgrading it to Xcode 4, see this guide on upgrading.

like image 171
bkaid Avatar answered Feb 25 '26 21:02

bkaid


In addition to copying the headers into your project, you also need to copy the implementation (.m) files. Make sure they're included in your target's Compile Sources build phase after you copy them in.

like image 45
Cameron Spickert Avatar answered Feb 25 '26 22:02

Cameron Spickert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!