0

I am developing an iphone application which has some facebook integration in it.I added the fbconnect folder which i downlaoded from internet and added #import "FBConnect/FBConnect.h". But when i run the app it shows a lot of errors like

  "FBConnect/FBConnect.h" no such file or directory
  "FBConnect/FBsession.h" no such file or directory etc.

I downloaded some facebook projects that works fine But what can be the problem with mine?

2
  • do u have specify the header serarchpath?
    – kanmani
    Mar 2, 2011 at 10:19
  • @ renuga :no i havnt but the projects i have have seen does not do this .they just put the FBConnect folder in the x-code project and they run fine Mar 2, 2011 at 10:22

3 Answers 3

4

Your header search path is not correct.

In your header search paths write ../src/ & place your facebook connect downloaded source in the same folder in which your project is kept.It should work then.

2
  • ..src/ will only work if you have a Facebook classes folder stored with name of "src" Mar 2, 2011 at 11:01
  • I mean whatever is your folder name for facebook
    – Swastik
    Mar 2, 2011 at 11:06
1

I’m not sure if there are other, easier ways, but I do this using the Header Search Paths setting (right-click on the target, Get Info, select the Build tab and filter for Header). There you have to enter the path to the Facebook SDK so that the compiler sees the FBConnect directory.

1

I got a solution from the above answer for this but i want to give all details about this so others can benifit .

  • First download a fbconnect project from this site
  • Then make your own facebook project and save the downloaded project folder in the same directory as your project
  • Then go to target>get info>Build>header search and make a new field as ../src(or whatever you name the downloaded project folder)
  • Drag the Fbconnect folder to your xcode and mark the copy check box (It must include the FBConnect bundle)
  • Run.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.