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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:03:26+00:00 2026-05-27T20:03:26+00:00

I am creating an app for Facebook and twitter integration using sharekit. That works

  • 0

I am creating an app for Facebook and twitter integration using sharekit. That works fine. But now I want to retrieve the username and password for facebook login. I followed this link.

But I am not able to retrieve these..

I can’t understand how can use that method and where can i use to retrieve username and password

Can you please guide me if you know.

  • 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-27T20:03:26+00:00Added an answer on May 27, 2026 at 8:03 pm

    First of all, you can’t retrieve a user’s Facebook password. Hopefully the reasons for this are obvious.

    You can, however, retrieve the access token that your app is granted once you connect your app to a user’s Facebook account using ShareKit.

    As of this writing, I don’t believe ShareKit makes the access token accessible directly, but there’s an easy hack to retrieve it.

    Step 1: Ensure that you’re app is authorized to connect to Facebook

    BOOL isConnected = [SHKFacebook isServiceAuthorized];
    

    If you get isConnected == NO here, your UI should indicate that the user needs to connect to Facebook to use your sharing features.

    Step 2: Get the access token in order to access the user’s Facebook data

    Assuming you got isConnected == YES in step 1

    // Hack into ShareKit's user defaults
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    NSString *accessToken = [defaults valueForKey:@"kSHKFacebookAccessToken"];
    

    Step 3: Bypass ShareKit and make a custom query to the Facebook SDK

    Assuming a property in your class such as this one…

    // Change "strong" to "retain" if not using ARC
    @property (nonatomic, strong) SHKFacebook *shkFb; 
    

    …you can start a Facebook query with something like this…

        if ( !fb ) {
            // This is how SHKFacebook instantiates a Facebook object. YMMV.
            self.fb = [[Facebook alloc] initWithAppId:SHKCONFIG(facebookAppId)];
        }
    
        NSMutableDictionary *fbParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                         @"name", @"fields",
                                         accessToken, @"access_token",
                                         nil];
        [fb requestWithGraphPath:@"me" andParams:fbParams andDelegate:self];
    

    Step 4: Implement the Facebook delegate methods

    Once the Facebook query’s done, it’ll notify your object, at which point you can do fancy things such as display the user’s name to make it clear whose wall will get posts sent from your app.

    You’ll need to declare the FBRequestDelegate protocol in your .h, of course:

    #import "Facebook.h"
    
    @interface YourClass : NSObject <FBRequestDelegate>
    

    And you’ll need to implement (minimally) the success and failure methods from FBRequestDelegate:

    #pragma mark - FBRequestDelegate
    
    - (void)request:(FBRequest *)request didLoad:(id)result {
    
        // Additional keys available in "result" can be found here:
        // https://developers.facebook.com/docs/reference/api/user/ 
        NSString *username = [result objectForKey:@"name"];
    
        // Localize if you're at all interested in the global app market!
        NSString *localizedString = NSLocalizedString(@"connected as %@",
                                                      @"Connection status label");
    
        // The label will read "connected as <username>"
        self.statusLabel.text = [NSString stringWithFormat:localizedString, username];
    }
    
    - (void)request:(FBRequest *)request didFailWithError:(NSError *)error {
        // Handle failure
    
        // (In our app, we call [SHKFacebook logout]
        // and display an error message to the user with
        // an option to retry connecting to Facebook.)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a facebook app and on Internet Explorer 9 it works fine. But
I am creating an app using the Facebook C# API. I want to read
I would like to integrate my app with Facebook, Twitter and Flickr. But the
I'm creating an iphone app using Facebook apis. I need to get the user's
I am creating an iphone app using Facebook api. Here I'm using the following
I am creating a Facebook App using Django. When I access my webpage directly
I'm creating an iPhone App that uses facebook connect to enable the user to
I'm attempting to replicate the Facebook app's new menu slider. Creating a slider that
I am building a Facebook app using iframe rendering. I want to use CodeIgniter
Here I am creating an iPhone app using facebook api. I have loaded the

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.