Добавяне на персонализирано действие върху бутона Facebook в листа за споделяне в iOS?

Създавам приложение за четене на статии за iPhone.

В viewDidLoad добавих лента за навигация, бутон за споделяне на лист.
Когато щракна върху бутона за споделяне, листът за споделяне се отваря с бутон за поща в Google и бутон за facebook. сега искам да извикам собствената си функция при щракване на бутона във facebook в листа за споделяне.

ето код:

- (IBAction)ysshareAction:(id)sender {
  //share sheet defination

  NSURL *Imageurl = [NSURL URLWithString:_DetailModal1[2]];
  NSData *data =  [NSData dataWithContentsOfURL:Imageurl];

  UIImage *image = [[UIImage alloc] initWithData:data];

  NSURL *linkURL = [NSURL URLWithString:_DetailModal1[4]];//article url

  NSMutableAttributedString *stringText = [[NSMutableAttributedString alloc] initWithString:_DetailModal1[0]];//_DetailModal1[0] contain article title////
  [stringText addAttribute:NSLinkAttributeName value:linkURL range:NSMakeRange(0, stringText.length)];
      //If(click on fb button)   //Isuue is here
       //  { do following  }
  NSArray *itemArrany = @[stringText,image,];//title is displayed but not as hyperlink.
      UIActivityViewController *AVC = [[UIActivityViewController alloc]     initWithActivityItems:itemArrany applicationActivities:nil];
     AVC.excludedActivityTypes=@[];
      [self presentViewController:AVC animated:YES completion:nil];

      }

person Raghav Singh    schedule 30.07.2014    source източник
comment
искаш да кажеш, че си използвал UIActivityViewcontroller или UIActionSheet?   -  person ChintaN -Maddy- Ramani    schedule 30.07.2014
comment
@ Chinttu, благодаря, да, използвам UIActivityViewcontroller, искам, когато щракна върху бутона за facebook в UIActivityViewcontroller, да се изпълнява определен код за споделяне във Facebook   -  person Raghav Singh    schedule 30.07.2014
comment
@ chinttu, актуализирах въпроса си с код, моля, погледнете веднага   -  person Raghav Singh    schedule 30.07.2014
comment
проверете тази връзка може би ще ви помогне.   -  person ChintaN -Maddy- Ramani    schedule 30.07.2014