title: Uploading UImage to facebook
body: <p>My following code for posting the UIImage to user's  facebook wall is not working .I've looked into  the sample code that comes along with the  facebook sdk and its working fine. I am unable to find whats going wrong with my code.</p>
  
  <pre><code>-(void) shareOnFacebook
  {
  facebook = [[Facebook alloc] initWithAppId:@"MYAPPID" andDelegate:(id)self];
  
  NSArray * neededPermissions = [[NSArray alloc] initWithObjects:@"offline_access",@"user_about_me", @"publish_stream", @"user_photos", nil] ;
  [facebook authorize:neededPermissions ];
  
  if (![facebook isSessionValid]) 
  {
  
  
  
  
  
      NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                     img, @"picture",
                                     nil];
      [facebook requestWithGraphPath:@"me/photos"
                                      andParams:params
                                  andHttpMethod:@"POST"
                                    andDelegate:(id)self];
  
  
  
  } 
  </code></pre>
  
  <p>}</p>
  
  <p>please tell me that what can be the problems?</p>
  
  <p>thanks in advance..</p>