title: Facebook SDK for iOS post on wall using open graph API
body: <p>I'm trying to post a message on my Facebook page and it works fine but the post is visible only to me. My friends don't see it! It seems like it's not "public".</p>
  
  <p>I have set <code>defaultAudience:FBSessionDefaultAudienceEveryone</code> so it should post to everyone, not only for me.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>-(void)postOnFacebook
  {
      if (FBSession.activeSession.isOpen)
          [self postOnWall];
      else
      {
          [FBSession openActiveSessionWithPublishPermissions:[NSArray arrayWithObjects:@"publish_actions", nil]
                                             defaultAudience:FBSessionDefaultAudienceEveryone
                                                allowLoginUI:YES
                                           completionHandler:^(FBSession *session,
                                                           FBSessionState status,
                                                           NSError *error)
          {
             if (error)
                NSLog(@"Login failed");
             else if (FB_ISSESSIONOPENWITHSTATE(status))
                [self postOnWall];
          }];
      };
  }
  
  - (void)postOnWall
  {
     FBRequestConnection *newConnection = [[FBRequestConnection alloc] init];
  
     FBRequestHandler handler =
         ^(FBRequestConnection *connection, id result, NSError *error) {
              [self requestCompleted:connection forFbID:@"me" result:result error:error];
         };
  
     NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                     @"pippo", @"message",
                                     nil];
  
     FBRequest *request=[[FBRequest alloc] initWithSession:FBSession.activeSession graphPath:@"me/feed" parameters:params HTTPMethod:@"POST"];
     [newConnection addRequest:request completionHandler:handler];
     [requestConnection cancel];
     requestConnection = newConnection;
     [newConnection start];
  }
  </code></pre>