/// <summary> /// 分享视频 /// </summary> /// <param name="path"></param> public bool ShareVideo(string path) { if (path == null) { return(false); } Debug.Log("path===" + path); ssdk.DisableSSO(false); if (ssdk.IsClientValid(PlatformType.SinaWeibo) == false) { return(false); } ShareContent content = new ShareContent(); content.SetText("视觉美景+智能呈现 只留精彩,不留遗憾"); content.SetFilePath(path); content.SetTitle("AR游"); content.SetShareType(ContentType.File); content.SetTitleUrl("http://download.vszapp.com"); content.SetUrl("http://download.vszapp.com"); #if UNITY_ANDROID String[] plats = new String[3]; plats[0] = PlatformType.QQ.ToString(); plats[1] = PlatformType.WeChat.ToString(); plats[2] = PlatformType.WeChatMoments.ToString(); content.SetHidePlatforms(plats); #elif UNITY_IOS || UNITY_IPHONE PlatformType[] plats = new PlatformType[1]; plats[0] = PlatformType.SinaWeibo; #endif ShareContent SinaShareParams = new ShareContent(); SinaShareParams.SetText("视觉美景+智能呈现 只留精彩,不留遗憾"); SinaShareParams.SetTitle("AR游"); SinaShareParams.SetShareType(ContentType.File); SinaShareParams.SetFilePath(path); SinaShareParams.SetShareContentCustomize(PlatformType.SinaWeibo, SinaShareParams); #if UNITY_ANDROID //通过分享菜单分享 ssdk.ShowPlatformList(null, content, 100, 100); #elif UNITY_IOS || UNITY_IPHONE //通过分享菜单分享 ssdk.ShowPlatformList(plats, content, 100, 100); #endif return(true); }
public void SinaWeiboShareVideo(string path) { Debug.Log("videopath====" + path); AddShareCallBack(); ShareContent sina = new ShareContent(); // sina.SetShareType(ContentType.File); sina.SetFilePath("/sdcard/test.mp4"); ssdk.ShareContent(PlatformType.SinaWeibo, sina); }