fb分享;比赛页面箭头去了

This commit is contained in:
Caiyanpeng committed 2022-01-13 15:35:57 +08:00
1 parent 7a7c1ee55c
commit 4d5523e2ff
9 files changed
+547 -430

No files matched your search

@@ -8,6 +8,7 @@ using System;
using DG.Tweening;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using Facebook.Unity;
namespace Assets.Scenes.Ride.Scripts
{
@@ -90,9 +91,19 @@ namespace Assets.Scenes.Ride.Scripts
#if UNITY_ANDROID || UNITY_IOS
cyclingController.AddEvent(shareWxBtn, EventTriggerType.PointerClick, shareToWx);
cyclingController.AddEvent(shareWxGpButton, EventTriggerType.PointerClick, shareToWxGp);
var fbButton = transform.Find("ToolBarPanel/FaceBookButton").gameObject;
cyclingController.AddEvent(fbButton, EventTriggerType.PointerClick, shareToFb);
#endif
}
private void shareToFb(BaseEventData arg0)
{
FB.ShareLink(contentURL: new Uri($"{App.CurrentUser.WebHost}RoutesRecords/{cyclingController.RankingId}?Token={App.CurrentUser.cookie}"),
contentTitle: cyclingController.mapRoute.Name,
contentDescription: "By " + App.CurrentUser.Nickname,
photoURL: new Uri(cyclingController.mapRoute.CoverImage));
}
private void shareToWx(BaseEventData b)
{
if (App.weChatController.IsWeChatAppInstalled())