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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:47:24+00:00 2026-06-06T11:47:24+00:00

Im creating a game an want to be able to add there score so

  • 0

Im creating a game an want to be able to add there score so when they post it on fb it shows them there high score, (to add a bit more of a social aspect as)

here is the code i am suing but it dosnt seem to work and crashes the app,

- (void)fbDidLogin {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
    [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
    [defaults synchronize];
    [self postwall];

}
- (void)postwall
{
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   //kAppId, @"app_id",
                                   @"https://developers.facebook.com/docs/reference/dialogs/", @"link",
                                   @"http://fbrell.com/f8.jpg", @"picture",
                                   @"Watch Ma Balls", @"name",
                                   @"How long can you keep out of the way of ma balls for", @"caption",
                                   @"I reached a score of i% can you beat me!.",highscore, @"description",
                                   nil];

    [facebook dialog:@"feed" andParams:params andDelegate:self];
}

the code works fine with out the

highscore

there

is there a way that it can be added to the string so it shows?

  • 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-06T11:47:26+00:00Added an answer on June 6, 2026 at 11:47 am

    Try this (assuming highscore is an int):

    NSString *string = @"I reached a score of ";
    string = [string stringByAppendingString:[NSString stringWithFormat:@"%d", highscore]];
    string = [string stringByAppendingString:@" can you beat me?"];
    
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       //kAppId, @"app_id",
                                       @"https://developers.facebook.com/docs/reference/dialogs/", @"link",
                                       @"http://fbrell.com/f8.jpg", @"picture",
                                       @"Watch Ma Balls", @"name",
                                       @"How long can you keep out of the way of ma balls for", @"caption",
                                       string, @"description",
                                       nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a game currently and I want users to be able to
Im creating a game ... I want to add a counter as a clock
I am creating a game where I want to determine the intersection of a
I'm creating a game in c++ and OpenGL and want an enemy to move
I m creating a game, in that i want to use some animation, but
I'm creating an game server list, and I want to measure uptime for certain
I'm creating a 2D game and when the player dies I want the texture
I'm creating a 2D game with OpenGL ES for Android.I want to perform a
i'm creating a card game on iphone. My problem is that i want to
I'm creating my own API for a game-statistics system (in PHP). And I want

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.