title: iPhone Facebook sdk, publish to wall
body: <p>I got the following example form iPhone SDK sample code and probably tried 10 others but i cant seem to be able to post a message to my wall. I dont want a dialog popup to appear for me to enter my message, I want it so when the user click on a post button and the message will auto post to my wall. Im using the new version of Facebook iPhone SDK on iPad. </p>
  
  <p>Id appreciate if someone can spot where im going wrong, at the moment i have no errors or warnings. The permissions i have in place are  "email" and "publish_stream".</p>
  
  <p>Thank you in advance.</p>
  
  <p>Ive found App page on facebook if anyone is interested (http://www.facebook.com/settings/?tab=applications). </p>
  
  <pre><code>SBJSON *jsonWriter = [[SBJSON new] autorelease];
  
  NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
                                                         @"Always Running",@"text",@"http://itsti.me/",@"href", nil], nil];
  
  NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
  NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
                              @"a long run", @"name",
                              @"The Facebook Running app", @"caption",
                              @"it is fun", @"description",
                              @"http://itsti.me/", @"href", nil];
  NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
  NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                 @"Share on Facebook",  @"user_message_prompt",
                                 actionLinksStr, @"action_links",
                                 attachmentStr, @"attachment",
                                 nil];
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  NSLog(@"%@",[NSString stringWithFormat:@"%@/feed", [defaults objectForKey:USERID]]);
  [facebook requestWithMethodName:[NSString stringWithFormat:@"%@/feed", [defaults objectForKey:USERID]]
                         andParams:params
                     andHttpMethod:@"POST"
                       andDelegate:self]; 
  </code></pre>
  
  <p>If others stumble on this and wish to know how to remove the option so safari doesnt take over you screen, find the following and set safariAuth:NO.</p>
  
  <p>[self authorizeWithFBAppAuth:YES safariAuth:YES];</p>
  
  <p>You will also need to uncomment "return" from the following method so that the webpage doesnt expand out of its holder every time the user clicks between the input box and dismissing the keyboard.</p>
  
  <ul>
  <li>(void)keyboardWillShow:(NSNotification*)notification</li>
  </ul>