ios开发sharedsdk分享到微信代码怎么写

2025-05-06 22:54:59
推荐回答(1个)
回答1:

/**
* 微信好友
*/
//SSDKPlatformSubTypeWechatSession
/**
* 微信朋友圈
*/
//SSDKPlatformSubTypeWechatTimeline

SSDKPlatformType platform = SSDKPlatformSubTypeWechatSession;

[ShareSDK shareWithContentName:@"这是一个分享消息" platform:platform customFields:nil onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
NSLog(error?@"分享失败":@"分享成功");
}];