繁体   English   中英

将共享iOS / whatsapp集成到我的应用中。 同时将图片和文本共享到whatsapp

[英]Integrate share iOS / whatsapp in my app. Share Picture and text at the same time to whatsapp

是否已经有一种方法可以将我的应用程序中的图片和文本以一种动作共享到whatsapp?

我只能找到一个android解决方案。 iOS一定有可能吗? 希望任何人都有解决方案!

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

非常需要帮助,请尝试一切并在任何地方进行搜索! 请专家站起来:)! 在此先感谢您,希望收到您的来信!

WhatsApp具有“自定义URL方案”和“文档交互”( http://www.whatsapp.com/faq/zh/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];

希望有人对这个问题有完整的答案,我也对图像和文本组合感到困惑。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM