关于 share 音乐分享官方文档补充
阅读原文时间:2023年07月08日阅读:3

例子 音乐分享

/*--------微信朋友圈--------*/

[shareParams SSDKSetupWeChatParamsByText:@"内容" title:@"标题" url:@"点击跳转连接" thumbImage:nil image:@"显示图片"  musicFileURL:@"音乐链接" extInfo:nil fileData:nil emoticonData:nil type:SSDKContentTypeAudio forPlatformSubType:SSDKPlatformSubTypeWechatTimeline];

SSDKContentTypeAudio :代表是音乐类型

SSDKPlatformSubTypeWechatTimeline:代表分享的平台

微信好友,微信朋友圈,qq 好友,新浪微博 支持

qq 空间不支持音乐分享

- (void)SSDKSetupSinaWeiboShareParamsByText:(NSString *)text
title:(NSString *)title
image:(id)image
url:(NSURL *)url
latitude:(double)latitude
longitude:(double)longitude
objectID:(NSString *)objectID
type:(SSDKContentType)type

注意: 新浪微博稍有不同   他的分享音乐机制为  在text中 将内容和分享的音乐链接拼接  微博自动识别

补充小知识:如果你在用 share 分享时 弹出 shareUI 时无图片 进行如下代码设置

p.p1 { margin: 0; font: 14px Menlo; color: rgba(41, 76, 80, 1) }
span.s1 { font-variant-ligatures: no-common-ligatures; color: rgba(0, 0, 0, 1) }
span.s2 { font-variant-ligatures: no-common-ligatures }
p.p1 { margin: 0; font: 14px "PingFang SC"; color: rgba(30, 148, 33, 1) }
p.p2 { margin: 0; font: 14px Menlo; color: rgba(49, 89, 93, 1) }
span.s1 { font: 14px Menlo; font-variant-ligatures: no-common-ligatures }
span.s2 { font-variant-ligatures: no-common-ligatures }
span.s3 { font-variant-ligatures: no-common-ligatures; color: rgba(0, 0, 0, 1) }
span.s4 { font-variant-ligatures: no-common-ligatures; color: rgba(60, 130, 139, 1) }
span.s5 { font-variant-ligatures: no-common-ligatures; color: rgba(41, 76, 80, 1) }

//设置简单分享菜单样式

[SSUIShareActionSheetStyle setShareActionSheetStyle:ShareActionSheetStyleSimple];

并且关闭官网的 图标下载设置

p.p1 { margin: 0; font: 14px Menlo; color: rgba(30, 148, 33, 1) }
p.p2 { margin: 0; font: 14px Menlo; color: rgba(41, 76, 80, 1) }
span.s1 { font-variant-ligatures: no-common-ligatures; color: rgba(0, 0, 0, 1) }
span.s2 { font-variant-ligatures: no-common-ligatures }
span.s3 { font: 14px "PingFang SC"; font-variant-ligatures: no-common-ligatures }
span.s4 { font-variant-ligatures: no-common-ligatures; color: rgba(83, 154, 164, 1) }
span.s5 { font-variant-ligatures: no-common-ligatures; color: rgba(196, 34, 117, 1) }
span.s6 { font-variant-ligatures: no-common-ligatures; color: rgba(97, 34, 174, 1) }
span.s7 { font-variant-ligatures: no-common-ligatures; color: rgba(62, 30, 129, 1) }
span.s8 { font-variant-ligatures: no-common-ligatures; color: rgba(4, 53, 255, 1) }
span.s9 { font-variant-ligatures: no-common-ligatures; color: rgba(49, 89, 93, 1) }

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章