コード例 #1
0
 private void OnClickShareFacebook(GameObject go)
 {
     SocialService.GetAccessToken(SocialType.Facebook, (status, token) =>
     {
         if (status)
         {
             APIGeneric.PostFacebook(token, data.title, null, delegate(bool status1, string message)
             {
                 if (status == false)
                 {
                     DialogService.Instance.ShowDialog(new DialogMessage("Lỗi", "Gặp lỗi khi post facebook", null));
                 }
                 if (gameObject != null)
                 {
                     GameObject.Destroy(gameObject);
                 }
             });
         }
         else
         {
             DialogService.Instance.ShowDialog(new DialogMessage("Lỗi", "Không thể đăng nhập Facebook.", null));
             if (gameObject != null)
             {
                 GameObject.Destroy(gameObject);
             }
         }
     });
 }