Tuesday, 15 June 2010

how to post text to friend wall in Facebook in iphone sdk? -


I have some problems to want to post on the wall of a friend text but use this code ...

  - (Ibkshn) Postobuddivll {Nsmtabledikshnri * Postvriablesdikshnri = [[Nsmtabledikshnri light] Init]; [PostVariablesDictionary set object: @ "LO" for: @ "name"]; [PostVariablesDictionary set object: @ "hello" for: @ "message"]; Facebook * FB = [[(AppDelegate *) [[UIApplication shared application] representative]] fbInstance]; [FB requestWithGraphPath: [NSString stringWithFormat: @ "% @ / feed", self.fbFriendsInvited] andParams: postVariablesDictionary andHttpMethod: @ "Post" andDelegate: nil]; NSLog (@ "Message:% @", PostWirelessAxtria); [Postwirebases release]; UIAlertView * facebookAlter = [[UIAlertView alloc] initWithTitle: @ "message" message: @ representatives "was successfully published on Facebook" self CancelButtonTitle: @ "OK" OtherButtonTitles: zero, zero]; [Facebook alter show]; [Facebook Alter release]; [Self shotgun viewer unpowered: yes complete: zero]; }   

Please suggest if u have ... thanks !!

Try this:

  NSMutableDictionary * postVariablesDictionary = [[NSMutableDictionary Alloc] init]; [PostVariablesDictionary set object: @ "LO" for: @ "name"]; [PostVariablesDictionary set object: @ "hello" for: @ "message"]; // Post Friends Wall [FBRequestConnection startWithGraphPath: [NSString stringWithFormat: @ "% @ / feed", self.fbFriendsInvited] parameters: postVariablesDictionary HTTPMethod: @ "Post" completionHandler: ^ (FBRequestConnection * connection, ID results, NSError * Error) {NSLog (@ "% @", result); }];    

No comments:

Post a Comment