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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:46:43+00:00 2026-05-21T11:46:43+00:00

I am trying to post text from my iPhone app to my wall on

  • 0

I am trying to post text from my iPhone app to my wall on Facebook. Everything works fine, however, my problem is that I am not sure how to format the text. I would like to show the user the name, address, city, state, and phone number of the restaurant they are viewing on the app. Here is my relevant code:

- (void)postToWall {

FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.userMessagePrompt = @"Enter your message:";
dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"%@ got straight A's!\",\"href\":\"http://www.example.com/\",\"caption\":\"%@ must have gotten real lucky this time!\",\"description\":\"\",\"media\":[{\"type\":\"image\",\"src\":\"http://www.abc.png\",\"href\":\"http://www.example.com/\"}]}",
                     _facebookName, _facebookName];
dialog.actionLinks = @"[{\"text\":\"Download GetHalal!\",\"href\":\"http://www.example.com/\"}]";
[dialog show];

}

I would like to show the user the restaurant information in the dialog.attachment variable, such that the output on the facebook wall looks like this:

restaurant.name
restaurant.address
restaurant.city, restaurant.state
restaurant.phoneNumber

My problem is, the text above appears to be in JSON format. The restaurant object is available in the class, and I’d like to include it in the code above, but I don’t know how. Can anyone show me how to do this?

  • 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-21T11:46:43+00:00Added an answer on May 21, 2026 at 11:46 am

    Use a JSON library:

    https://stackoverflow.com/questions/286087/best-json-library-to-use-when-developing-an-iphone-application

    Also, check the Facebook sdk for iOS:

    http://developers.facebook.com/docs/guides/mobile/#ios

    The accepted answer in this StackOverflow post has the code you need, with JSONfragment:

    How to post a message with attachment in Facebook?

    (note that, in this case, the library used is http://code.google.com/p/json-framework/ )

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

Sidebar

Related Questions

HI Guys, I have following problem. I'm trying to connect from my Iphone app
I'm trying to post some information from a from do so some calculations, however
I'm trying to post all status text from our application to twitter, status text
I am trying to send images and text from an iPhone application to a
I am trying to post some content to Facebook wall through my Android application.
I'm trying to post to a text box from anywhere in my program, regardless
I'm trying to wrap the text from a post around a partial, which renders
I'm trying to send a multi-line post from an iPhone/iPad to a php service,
I am trying to post text from a class into an active form and
I am trying to post messages to facebook wall using Android's default Facebook client.

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.