首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Skype消息共享

Skype消息共享
EN

Stack Overflow用户
提问于 2014-06-26 17:46:36
回答 2查看 907关注 0票数 1

我想在我的iOS应用程序上实现Skype即时消息发送/共享。我只想在skype上分享一些链接。

下面是我使用的代码:

代码语言:javascript
复制
//skype sharing

    BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"skype:"]];
    NSString * msg = [NSString stringWithFormat:@"Hi. Check it out.\n %@  %@",[[self Detail] objectForKey:@"title"],self.shareLink];
    NSString * urlSkype = [NSString stringWithFormat:@"skype:?chat=%@",msg];
    NSURL * SkypeURL = [NSURL URLWithString:[urlSkype stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
    if(installed)
    {
        [[UIApplication sharedApplication] openURL:SkypeURL];
    }
    else
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.com/apps/skype/skype"]];
    }

如果安装了skype,那么上面的代码也不能正常工作。我希望消息- Skype应该自动发送(作为即时消息)到我从iOS应用程序中选择的msg联系人。

我如何实现这一点?

EN

回答 2

Stack Overflow用户

发布于 2014-12-17 20:18:10

正如Skype URI API参考文档中所述,这是不可能的。

或直接链接,Skype URI API reference for Chat

这是,Skype URI tutorial: iOS apps

他们还在那里添加了一个注释,

随着最近对Skype

iOS客户端的重新设计,用于iOS 5.x的Skype分支目前不支持URI。

票数 2
EN

Stack Overflow用户

发布于 2014-12-17 20:01:50

在我看来,用户可以与选定的Skype联系人开始新的聊天,但不能立即发送消息。

要与给定用户开始新聊天,请执行以下操作:

代码语言:javascript
复制
NSString * urlSkype = [NSString stringWithFormat:@"skype:skype.test.user.1?chat",msg];

有关更多信息,请查看Skype URI API reference (Chat)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24427292

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档