ios - Share current URL of UIWebview to Facebook and Twitter -


so want share current url of webview facebook , twitter using social framework in xcode, can tell me how here code

- (ibaction)social:(id)sender {     uiactionsheet *share = [[uiactionsheet alloc] initwithtitle:@"pass on news!" delegate:self cancelbuttontitle:@"ok" destructivebuttontitle:nil otherbuttontitles:@"post twitter", @"post facebook", nil];      [share showinview:self.view]; }  - (void)actionsheet:(uiactionsheet *)actionsheet clickedbuttonatindex:(nsinteger)buttonindex {     if (actionsheet.tag == 0) {         if([slcomposeviewcontroller isavailableforservicetype:slservicetypetwitter]) {             slcomposeviewcontroller *tweetsheet =[slcomposeviewcontroller composeviewcontrollerforservicetype:slservicetypetwitter];             [tweetsheet setinitialtext:@"check out article found using 'pass'  iphone app: "];             [self presentviewcontroller:tweetsheet animated:yes completion:nil];         } else {             uialertview *alertview = [[uialertview alloc] initwithtitle:@"sorry" message:@"you can't send tweet right now, make sure have @ least 1 twitter account setup , device using ios6 or above!." delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil];             [alertview show];         }     } } 

[tweetsheet addurl:self.webview.request.url];


Comments