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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:55:32+00:00 2026-05-18T03:55:32+00:00

When a Facebook dialog is created with code like this NSMutableDictionary* params = [NSMutableDictionary

  • 0

When a Facebook dialog is created with code like this

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: apiKey, @"api_key", nil];
[facebook dialog:@"stream.publish" andParams:params andDelegate:self];

is there the possibility to use sessions?

I succeeded in publishing a post on a user’s post wall, but how allow the user to logout?
Moreover I obtain this error when I try to access to current user information.

{
    error = {
        message = "An active access token must be used to query information about the current user.";
        type = OAuthException;
    };
}
  • 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-18T03:55:33+00:00Added an answer on May 18, 2026 at 3:55 am

    I create the Facebook object in viewDidLoad

    _facebook = [[Facebook alloc] init];
    

    I have a tableView. When the user clicks on an entry, an action sheet pops up with 3 choices

    1 send an email

    2 share on Facebook

    3 log out from Facebook: it should be there only if the user is logged, however for the moment it’s there and it works.
    I use

    [_facebook logout:self]; 
    

    and moreover the method

    - (void)fbDidLogout is called.
    

    When the user clicks on “share on Facebook”, this code is run

    SBJSON *jsonWriter = [SBJSON new];
    NSDictionary *actionLinks = [NSArray arrayWithObjects:
                                    [NSDictionary dictionaryWithObjectsAndKeys:
                                                @"Some text", @"text",
                                            @"http://try.com",@"href", nil], nil];
    
    NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
    
    NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
                                           @"is using...", @"name",
                                        @"It's an app….", @"caption",
                                        @"Download!", @"description",
                                        @"http://ituneslink", @"href",
                                        nil];
    
    NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                           API_KEY, @"api_key",
                                           @"Message",  @"user_message_prompt",
                                           actionLinksStr, @"action_links",
                                           attachmentStr, @"attachment",nil];
    
            [_facebook dialog:@"stream.publish" andParams:params andDelegate:self];
    
            [jsonWriter release];
    

    In viewDidLoad, I’ve also tried to use

    _facebook.accessToken    = [[NSUserDefaults standardUserDefaults] stringForKey:@"AccessToken"];
    _facebook.expirationDate = (NSDate *) [[NSUserDefaults standardUserDefaults] objectForKey:@"ExpirationDate"];
    
    _permissions =  [[NSArray arrayWithObjects: @"read_stream", @"offline_access",nil] retain];
    
      if ([_facebook isSessionValid] == NO) {
          [_facebook authorize:API_KEY permissions:_permissions delegate:self];
      }
    

    putting in fbDidLogin:

    [[NSUserDefaults standardUserDefaults] setObject:_facebook.accessToken forKey:@"AccessToken"];
     [[NSUserDefaults standardUserDefaults] setObject:_facebook.expirationDate forKey:@"ExpirationDate"];
    

    but fbDidLogin is never called.

    EDIT

    I resolved using the FB october api (while I’ve not found a solution with the november one).

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

Sidebar

Related Questions

I have created an application in facebook,all is working fine except the publish to
Facebook Connect seems like the cool new way to leverage a user's Facebook account
I am building a Facebook App which is heavy on Javascript. For this I
I want to add share this on Facebook to a page. I've got this
i want to use facebook's fb:dialog tag to display a simple pop-up form for
is it possible to create a custom dialog login button for facebook
In the setup dialog for the Like-Button, there are only two options for layout:
Came in today and my Facebook Connect code is broken (no surprises there, each
I have a recaptcha code within a jQuery dialog. For some reason, when I
I have the following code to allow users to invite thier Facebook friends: function

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.