title: Facebook iOS SDK 3.1 post image on friends wall error
body: <p>I am using the latest Facebook iOS SDK 3.1.1
  while trying to post UIImage on friends wall i`m getting error 5 (Error: HTTP status code: 403).</p>
  
  <p>if i try to post the image on MY wall its working well, but not of one of my friends.</p>
  
  <p>My Code:
  1. before posting i am checking if the user has the right permissions, when he does i am making </p>
  
  <pre><code>-(void)postImageOnFriendsWall:(UIImage*)image FriendsArray:(NSArray*)friends
  {
      // if we don't have permission to announce, let's first address that
      if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound)
      {
  
      [FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
                                                 defaultAudience:FBSessionDefaultAudienceFriends
                                               completionHandler:^(FBSession *session, NSError *error)
       {
           if (!error)
           {
               // re-call assuming we now have the permission
               [self postImageOnFriendsWall:image FriendsArray:friends];
  
           }
           else
           {
               UIAlertView *alertView = [[UIAlertView alloc]  initWithTitle:@"Error"                        message:error.localizedDescription                                                                                                delegate:nil                                                                                         cancelButtonTitle:@"OK"
                                                          otherButtonTitles:nil];
               [alertView show];
           }
  
       }];
  }
  else
  {
  
      // can post image
      for (id&lt;FBGraphUser&gt; user in friends)
      {
  
  
          NSString *userID = user.id;
          NSLog(@"trying to post image of %@ wall",userID);
          NSMutableDictionary  *postVariablesDictionary = [[NSMutableDictionary alloc] init];
          [postVariablesDictionary setObject:UIImagePNGRepresentation(image) forKey:@"picture"];
          [postVariablesDictionary setObject:@"my image" forKey:@"message"];
  
          [FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/photos",userID] parameters:postVariablesDictionary HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
           {
               if (error)
               {
                   //showing an alert for failure
                   UIAlertView *alertView = [[UIAlertView alloc]  initWithTitle:@"Facebook" message:error.localizedDescription                                                                                                delegate:nil   cancelButtonTitle:@"OK"              otherButtonTitles:nil];
                   [alertView show];
               }
               else
               {
                   //showing an alert for success
                   UIAlertView *alertView = [[UIAlertView alloc]  initWithTitle:@"Facebook" message:@"Shared the photo successfully"                                                                                                delegate:nil   cancelButtonTitle:@"OK"              otherButtonTitles:nil];
                   [alertView show];
               }
           }];
  
  
  
      }
  }
  }
  </code></pre>
  
  <p>to mention, if i change </p>
  
  <p><code>startWithGraphPath:[NSString stringWithFormat:@"%@/photos",userID]</code> </p>
  
  <p>to</p>
  
  <pre><code>startWithGraphPath:[NSString stringWithFormat:@"me/photos",userID]
  </code></pre>
  
  <p>its working ok.</p>
  
  <p>what am i doing wrong?
  i have been trying to look for answers but nothing helped.
  Thank you!</p>