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 8551153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:07:55+00:00 2026-06-11T14:07:55+00:00

I have to get connected to the facebook on button click in iOS 6.0.

  • 0

I have to get connected to the facebook on button click in iOS 6.0. I have added the frameworks social and accounts to my project. I am able to check in to a place but, not able to tag friends for what I am posting to the facebook. How to fetch facebook friends list?

The code I have used is shown below :

- (IBAction)connectToFacebook:(id)sender
{
    ACAccountStore *accountStore = [[ACAccountStore alloc] init];
    ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

NSDictionary *options = @{
@"ACFacebookAppIDKey": @"412590558803147",
@"ACFacebookAppVersionKey": @"1.0",
@"ACFacebookPermissionsKey": @"publish_stream",
@"ACFacebookPermissionGroupKey": @"write"
};

NSLog(@"options is %@",options);

[accountStore requestAccessToAccountsWithType:accountType options:options
                                        completion:^(BOOL granted, NSError *error) {
                                            if (granted)
                                            {
                                                NSArray *accounts = [accountStore
                                                                     accountsWithAccountType:accountType];
                                            NSString *facebookAccount = [accounts lastObject];

                                                NSLog(@"facebook account %@", facebookAccount);
                                            } else {
                                                NSLog(@"%@",error);
                                                // Fail gracefully...
                                            }
                                        }];

if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {

    SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

    SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){
        if (result == SLComposeViewControllerResultCancelled) {

            NSLog(@"Cancelled");

        } else

        {
            UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Posted!!!" message:@"your status is posted to facebook successfully" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];

            [alert show];
        }

        [controller dismissViewControllerAnimated:YES completion:Nil];
    };
    controller.completionHandler =myBlock;

    [controller setInitialText:@"This is a ios 6.0 facebook intergration application"];
    [controller addImage:[UIImage imageNamed:@"spalshimage.jpeg"]];

    [self presentViewController:controller animated:YES completion:Nil];

}
else{
    NSLog(@"UnAvailable");
}

}

  • 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-11T14:07:57+00:00Added an answer on June 11, 2026 at 2:07 pm

    The best way to integrate Facebook is to use the new iOS 6 Facebook SDK:

    https://developer.apple.com/technologies/ios6/

    Try this link for friend list:

    https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/show-friends/

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

Sidebar

Related Questions

I have added a new permission request (publish_stream) to our facebook connect login button.
I have some scripts that get run often, always from within a connected SQLPlus
I have a dropdownlist connected to a objectdatasource. How can I get the DataValueField=TypeId
Simply, I'm just looking to get a list of connected remote disks. I have
Facebook gurus, I have been implementing the Facebook Like button for a number of
I have the following code to get user data form facebook <div id=fb-root></div> <script>
I have the following code (with my facebook.php correctly added in, appId and appSecret
I have a facebook like button on each of my wordpress blog posts, this
I have a page here that has a div with an Facebook recommend button.
I'm trying to subscribe to the Like button click. Here's the code I have:

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.