Good day! I would like to know how I can share it in VK, without an SDK. Well, that is I would like to know the link, like:

vk://vk.com/... 

And call on this type

 NSURL *url = [[NSURL alloc] initWithString:@"vk://vk.com/ХХХ"]; [[UIApplication sharedApplication] openURL:url]; 

Maybe someone did something like that?

  • all vk api is documented, you can, all you need to look there. moreover vk ios sdk all surs lies on the gita - you can copy and paste everything you need right from there. Well, a reminder: to share, you must first log in and get a token. In other words, it's a big enough bike to reinvent it yourself - Max Mikheyenko

1 answer 1

Hand it over to the system.

 func shareText(text: String) { var shareItems = [AnyObject]() shareItems.append(text as AnyObject) let activityViewController : UIActivityViewController = UIActivityViewController( activityItems: shareItems, applicationActivities: nil) activityViewController.excludedActivityTypes = [ UIActivityType.postToWeibo, UIActivityType.print, UIActivityType.assignToContact, UIActivityType.saveToCameraRoll, UIActivityType.addToReadingList, UIActivityType.postToFlickr, UIActivityType.postToVimeo, UIActivityType.postToTencentWeibo, UIActivityType.copyToPasteboard ] self.present(activityViewController, animated: true, completion: nil) }