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 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
  • 1 View
  • 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

Related Questions

I try to use the UIActionSheet within my iPhone App but have the following
Use Case: End-User searches for something and an ArrayCollection is returned with Result objects.
for my app I am using Facebook connect to share something from my app
how can i use a particular UIActionSheet's button with some actioning (explain in brief)
Use case: A does something on his box and gots stuck. He asks B
Use case: user clicks the link on a webpage - boom! load of files
use this website a lot but first time posting. My program creates a number
Use Case When a user goes to my website, they will be confronted with
use Control::CLI; $cli = new Control::CLI('SSH'); $cli->connect(Host=>'10.10.10.10',Username=>'user',Password=>'pwd'); $cli->waitfor('>'); $cli->print('Show XXXXXXXXXXXXXXXXXXXX| grep Active'); @f=$cli->waitfor('>'); print
Are there situations where a UIAlertView is better to use than a UIActionSheet? What

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.