How to embed Facebook share on iOS like at attached pic -


i came across app love know did used sharing on facebook.

the app shows share button opens window (see below image). share parameters of share dialog image , url meaning when post wall ever tap on go entered url.

does know how it?

enter image description here

you can native slcomposeviewcontroller. add social media framework. import in project add following lines:

- (ibaction)facebookpost:(id)sender {      if ([slcomposeviewcontroller isavailableforservicetype:slservicetypefacebook]) {          slcomposeviewcontroller *myslcomposersheet = [slcomposeviewcontroller composeviewcontrollerforservicetype:slservicetypefacebook];          [myslcomposersheet setinitialtext:@"social framework sharing test!"];          [myslcomposersheet addimage:[uiimage imagenamed:@"myimage.png"]];          [myslcomposersheet addurl:[nsurl urlwithstring:@"http://stackoverflow.com/questions/32692493/how-to-embed-facebook-share-on-ios-like-at-attached-pic"]];          [myslcomposersheet setcompletionhandler:^(slcomposeviewcontrollerresult result) {               switch (result) {                  case slcomposeviewcontrollerresultcancelled:                      nslog(@"post canceled");                      break;                  case slcomposeviewcontrollerresultdone:                      nslog(@"post sucessful");                      break;                   default:                      break;              }          }];          [self presentviewcontroller:myslcomposersheet animated:yes completion:nil];     } } 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -