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

  • Home
  • SEARCH
  • 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 600487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:36:40+00:00 2026-05-13T16:36:40+00:00

i use UIActionSheet to share something to faceook . every thing is good !

  • 0

i use UIActionSheet to share something to faceook .
every thing is good ! but still a problem . after user login on facebook -/////// logout and share buttons show bgreat but didn’t work great ! it means if user tap Logout button , login window appears again ! why ? i think , its because of FBLoginButton , when remove this method my UIActionSheet doesn’t Show .
does it way to implement FBConnect without FBLoginButton ?
here is my codes :

-(IBAction)mySheet:(id)sender
{
    if (session.isConnected) {
        UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:@"FaceBook"
                         delegate:self  cancelButtonTitle:@"Cancel"
                         destructiveButtonTitle:nil
                         otherButtonTitles: @"Share On the Facebook" , @"Log out Facebook" ,nil]; 
        [menu showInView:self.view]; 
        [menu release]; 
     } else {
        UIActionSheet *menu2 = [[UIActionSheet alloc] initWithTitle:@"FaceBook"
                         delegate:self  cancelButtonTitle:@"Cancel"
                         destructiveButtonTitle:nil
                         otherButtonTitles:  @"Log in Facebook" ,nil]; 

        [menu2 showInView:self.view]; 
        [menu2 release]; 
    }
}

- (void)actionSheet:(UIActionSheet *)menu2 didDismissWithButtonIndex:(NSInteger)buttonIndex {
    if (buttonIndex != [menu2 cancelButtonIndex]) 
    {    
        FBLoginDialog* login = [[FBLoginDialog alloc] initWithSession:session];
        [login show];
        [login release];
    } 
}

- (void)actionSheet:(UIActionSheet *)menu didDismissWithButtonIndex2:(NSInteger)buttonIndex {
    if (buttonIndex != [menu cancelButtonIndex]) 
    {
        [session logout];
    }   
}
  • 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-05-13T16:36:41+00:00Added an answer on May 13, 2026 at 4:36 pm

    If you jump to the definition of FBLogin you see it implements the FBSessionDelegate. Your goal as I see it would be to populate the session object. So if you implement that delegate and properly populate the session you should be good to go. Then you can use logout/willLogout/sessionDidLogout on the session explicitly.

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

Sidebar

Ask A Question

Stats

  • Questions 290k
  • Answers 290k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This works with std::vector, boost::array, built-in arrays an generally with… May 13, 2026 at 5:49 pm
  • Editorial Team
    Editorial Team added an answer A lot of good information from everyone, and I really… May 13, 2026 at 5:49 pm
  • Editorial Team
    Editorial Team added an answer You tried to put in data that was longer than… May 13, 2026 at 5:49 pm

Related Questions

As noted in the Apple developer docs for showFromTabBar , it says: The style
I've subclassed UIActionSheet , and in the -init method, I have to add the
Are there situations where a UIAlertView is better to use than a UIActionSheet? What
I have a UIActionSheet with an undetermined number of buttons. I'll need to use
I have an actionsheet popup in my iphone application. I would like to fill

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.