【问题标题】:Integrate share iOS / whatsapp in my app. Share Picture and text at the same time to whatsapp在我的应用程序中集成共享 iOS / whatsapp。同时分享图片和文字到whatsapp
【发布时间】:2014-11-17 21:03:49
【问题描述】:

是否已经有一种方法可以将我的应用中的图片和文本一次性分享到whatsapp?

我只能找到一个安卓解决方案。 iOS一定可以吗?希望任何人都得到了解决方案!

我在这里找到了图片和文字的解决方案,但我正在寻找android尚未提供的选项;从我的应用程序中,一次将图片和文本发送给 whatsapp 联系人。

非常需要帮助,尝试了所有方法并到处搜索!请高手站出来:)!在此先感谢您,希望收到您的来信!

【问题讨论】:

    标签: ios image text share whatsapp


    【解决方案1】:

    WhatsApp 有一个“自定义 URL 方案”和“文档交互”(http://www.whatsapp.com/faq/en/iphone/23559013)。

    但它似乎不支持像 Instagram (http://instagram.com/developer/mobile-sharing/iphone-hooks/) 那样设置文本的注释

    这是分享方式,但没有文字。

    self.documentationInteractionController =[UIDocumentInteractionController interactionControllerWithURL:jpegFileURL];
    self.documentationInteractionController.delegate = self;
    
    self.documentationInteractionController.UTI = @"public.jpeg";
    self.documentationInteractionController.UTI = @"net.whatsapp.image";
    
    // NOT WORKING - Found this solution, no success
    self.documentationInteractionController.annotation = @{@"message":@"Text here",@"text":@"Text here"};
    
    // NOT WORKING - Found other solution, no success
    self.documentationInteractionController.annotation = [NSString stringWithFormat:@"text=Text here"];
    
    // WORKING - BUT only for instagram
    self.documentationInteractionController.annotation = @{@"InstagramCaption":@"Text here"};
    
    [self.documentationInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES];
    

    希望有人对这个问题有完整的答案,我也被图像和文字组合所困扰。

    【讨论】:

      猜你喜欢
      • 2023-04-06
      • 2013-03-07
      • 2012-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-29
      • 2014-05-29
      相关资源
      最近更新 更多