ios - FacebookSDK: Share image on my timeline with text/link -



ios - FacebookSDK: Share image on my timeline with text/link -

is possible without share dialog? because far didn't found allow's that.

this share photo without text:

[fbrequestconnection startforuploadphoto:self.imagetoshare completionhandler:^(fbrequestconnection *connection, id result, nserror *error) { }];

this share text without photo:

nsmutabledictionary *params = [nsmutabledictionary dictionarywithobjectsandkeys: self.titletoshare, @"name", self.texttoshare, @"description", self.linktoshare, @"link", @"http://www.somesite.com/logo_i.png", @"picture", nil]; [fbrequestconnection startwithgraphpath:@"/me/feed" parameters:params httpmethod:@"post" completionhandler:^(fbrequestconnection *connection, id result, nserror *error) { }];

what do?

thanks in advance.

so i've found right reply after search sometime, best way post text want way:

nsmutabledictionary *params = [nsmutabledictionary dictionarywithobjectsandkeys: uiimagejpegrepresentation(self.imagetoshare, 1), @"source", self.texttoshare, @"message", (self.linktoshare)?self.linktoshare:@"", @"link", nil]; [fbrequestconnection startwithgraphpath:@"/me/photos" parameters:params httpmethod:@"post" completionhandler:^(fbrequestconnection *connection, id result, nserror *error) { }];

enjoy!

ios objective-c facebook facebook-graph-api share

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -