public override void Invite(string inviteMessage, string dialogTitle, InviteSuccess success, InviteFailed fail, InviteCancelled cancel) { FB.AppRequest(inviteMessage, null, null, null, null, "", dialogTitle, (IAppRequestResult result) => { if (result.Error != null) { SoomlaUtils.LogError(TAG, "Invite[result.Error]: "+result.Error); fail(result.Error); } else { SoomlaUtils.LogDebug(TAG, "Invite[result.Text]: "+result.RawResult); JSONObject jsonResponse = new JSONObject(result.RawResult); if (jsonResponse.HasField("cancelled")) { bool cancelled = jsonResponse["cancelled"].b; if (cancelled) { cancel(); return; } } if (jsonResponse.HasField("to")) { List<JSONObject> jsonRecipinets = jsonResponse["to"].list; List<string> invitedIds = new List<string>(); foreach (JSONObject o in jsonRecipinets) { invitedIds.Add(o.str); } success(jsonResponse["request"].str, invitedIds); } else { fail("Unable to send invite"); } } }); }
/// <summary> /// See docs in <see cref="SoomlaProfile.Invite"/> /// </summary> public override void Invite (string inviteMessage, string dialogTitle, InviteSuccess success, InviteFailed fail, InviteCancelled cancel) {}
/// <summary> /// See docs in <see cref="SoomlaProfile.Invite"/> /// </summary> public abstract void Invite(string inviteMessage, string dialogTitle, InviteSuccess success, InviteFailed fail, InviteCancelled cancel);
/// <summary> /// See docs in <see cref="SoomlaProfile.Invite"/> /// </summary> public override void Invite(string inviteMessage, string dialogTitle, InviteSuccess success, InviteFailed fail, InviteCancelled cancel) { }