Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8529635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:04:37+00:00 2026-06-11T09:04:37+00:00

I’m having trouble compiling the HelloFacebookSample app that comes with Facebook SDK 3.0. Firstly,

  • 0

I’m having trouble compiling the HelloFacebookSample app that comes with Facebook SDK 3.0.

Firstly, I should say I’m using Xcode 4.0.2, iOS SDK 4.3 and OS X 10.6.8. (I’m struggling to find a way to download Xcode 4.2 without upgrading to Lion or Mountain Lion, which I’m reluctant to do.)

When I try to build the sample project, I get the following build errors:

1) Unexpected ‘@’ in program

int main(int argc, char *argv[])
{
    @autoreleasepool {    // error on this line
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([HFAppDelegate class]));
    }
}

2) Expected identifier

- (BOOL)application:(UIApplication *)application 
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
    // attempt to extract a token from the url
    return [FBSession.activeSession handleOpenURL:url];    // error on this line
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // FBSample logic
    // if the app is going away, we close the session object
    [FBSession.activeSession close];                       // error on this line
}

I can “resolve” these problems (not sure if I resolved them correctly), but then I then get the following linking error:

Framework not found Accounts

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

Can anyone help me at all? I won’t have much luck integrating Facebook into my app if I can’t even build the sample projects!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:04:38+00:00Added an answer on June 11, 2026 at 9:04 am

    I resolved all the issues. It appears the sample is not immediately compatible with iOS 4.3 or Xcode 4.0.2. Here’s what I did:

    1) Unexpected @ in program; changed to the following:

    int main(int argc, char *argv[])
    {
        NSAutoreleasePool *pool = [NSAutoreleasePool new];
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([HFAppDelegate class]));
    }
    

    2) Expected identifier; replaced

        return [FBSession.activeSession handleOpenURL:url];    // error on this line
    ...
        [FBSession.activeSession close];                       // error on this line
    

    with

        return [[FBSession activeSession] handleOpenURL:url];
    ...
        [[FBSession activeSession] close];
    

    3) Framework not found Accounts; turns out it’s not required, so I just deleted the framework from the Frameworks group in the Project Navigator.

    4) I forgot to say in my original post: keyword strong was unknown, so I macro’d it as retain at the top of the file FacebookSDK/FacebookSDK.h as follows:

    #define strong retain
    

    And now the HelloFacebookSample app compiles with no errors or warnings and it works fine. All interactions with Facebook work.

    Hope this helps someone else in the future! If it helps you, please vote it up!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.