title: adding a Post To Facebook Timeline from iOS APP
body: <p>HI Im trying to enable a IBAction to post on an user's timeline while they have an active section. I am getting an error message stating; Implicit declaration of function "x" is invalid C99. I been reading posts about the issue but no luck and honestly I am not sure if I am doing this right at all. I updated the permissions on my fb app and got the object code from the Graph API Explorer but I dont know if Im implementing it right on my code.</p>
  
  <p>Here is my post method:</p>
  
  <pre><code>-(void) aPost
  {
      NSMutableDictionary&lt;FBGraphObject&gt; *object =
      [FBGraphObject openGraphObjectForPostWithType:@"website"
                                              title:@"CR Taxi APP"
                                              image:@"http://a4.mzstatic.com/us/r1000/047/Purple4/v4/05/cc/f2/05ccf23f-a409-1e73-a649-a5e6afc4e6eb/mzl.llffzfbp.175x175-75.jpg"
                                                url:@"https://itunes.apple.com/cr/app/cr-taxi/id674226640?mt=8"
                                        description:@"La nueva aplicación para llamar taxis!"];;
  
      [FBRequestConnection startForPostWithGraphPath:@"{id_from_create_call}"
                                         graphObject:object
                                   completionHandler:^(FBRequestConnection *connection,
                                                       id result,
                                                       NSError *error) {
                                       // handle the result
                                   }];
  
  }
  </code></pre>
  
  <p>and this is my action method</p>
  
  <pre><code>- (IBAction)publishAction:(id)sender {
  
      if ([FBSession.activeSession.permissions
           indexOfObject:@"publish_actions"] == NSNotFound) {
  
          NSArray *writepermissions = [[NSArray alloc] initWithObjects:
                                       @"publish_stream",
                                       @"publish_actions",
                                       nil];
  
  
          [[FBSession activeSession]requestNewPublishPermissions:writepermissions defaultAudience:FBSessionDefaultAudienceFriends completionHandler:^(FBSession *aSession, NSError *error){
              if (error) {
                  NSLog(@"Error on public permissions: %@", error);
              }
              else {
               **not on the code //( error on this one)   aPost(aSession, error);
              }
  
  
          }];
  
      }
      else {
          // If permissions present, publish the story
       **not on the code //(not an error on this one)  aPost(FBSession.activeSession, nil);
      }
  
  
  }
  </code></pre>
  
  <p>Please help!</p>
  
  <p>Thank you!</p>