Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to post image and text on facebook wall without using open graph API
    primarykey
    data
    text
    <p>I have developed a sample project where i am displaying Text and an Image and i am able to post it on facebook wall . I have shown the code and the image of it below .This appears like how we add a photo into our wall with status message</p> <pre><code>- (IBAction)postStatusUpdateClick:(UIButton *)sender { UIImage *image =[UIImage imageNamed:@"Icon-72@2x.png"]; NSMutableDictionary* params = [[NSMutableDictionary alloc] init]; [params setObject:@"Test with Image" forKey:@"message"]; [params setObject:UIImagePNGRepresentation(image) forKey:@"picture"]; shareOnFacebook.enabled = NO; //for not allowing multiple hits [FBRequestConnection startWithGraphPath:@"me/photos" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { if (error) { //showing an alert for failure [self showAlert:@"Facebook unable to share photo " result:result error:error]; } else { //showing an alert for success [self showAlert:@"Facebook share photo successful" result:result error:error]; } shareOnFacebook.enabled = YES; }]; } // UIAlertView helper for post buttons - (void)showAlert:(NSString *)message result:(id)result error:(NSError *)error { NSString *alertMsg; NSString *alertTitle; if (error) { alertTitle = @"Error"; if (error.fberrorShouldNotifyUser || error.fberrorCategory == FBErrorCategoryPermissions || error.fberrorCategory == FBErrorCategoryAuthenticationReopenSession) { alertMsg = error.fberrorUserMessage; } else { alertMsg = @"Operation failed due to a connection problem, retry later."; } } else { NSDictionary *resultDict = (NSDictionary *)result; alertMsg = [NSString stringWithFormat:@"Successfully posted '%@'.\nPost ID: %@", message, [resultDict valueForKey:@"id"]]; alertTitle = @"Success"; } UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:alertTitle message:alertMsg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; } </code></pre> <p><img src="https://i.stack.imgur.com/fLO5e.png" alt="enter image description here"></p> <p>*****Now i want to display in proper format like in the one in scrumptious example from facebook.** <img src="https://i.stack.imgur.com/532y9.png" alt="enter image description here"></p> <p><strong>I want to do it without open graph api . Can anyone help me in this</strong></p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload