TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mukesh
NA
228
42.8k
how to check messages read or not on whatsapp API Using C#
Dec 7 2018 3:15 AM
function
GetNotification() {
debugger
;
$.ajax({
type:
"POST"
,
url:
"@Url.Action("
GetNotification
", "
GetChat
")"
,
data:
""
,
contentType:
"application/json; charset=utf-8"
,
dataType:
"json"
,
success:
function
(data) {
$(
'#dvMsg'
).empty();
debugger
;
result = data;
$(
'#dvMsg'
).append(
''
);
for
(
var
j = 0; j < result.length; j++) {
$(
'#dvMsg'
).append(
'From:'
+ result[j].author +
' Message:'
+ result[j].body + '
');
}
},
error:
function
(result) {
}
});
}
setInterval(showMessage,
"100000"
);
public
JsonResult GetNotification()
{
WebClient client =
new
WebClient();
client.Headers[
"Content-type"
] =
"application/json"
;
client.Encoding = Encoding.UTF8;
//Testing tt = new Testing();
//tt.lastMessageNumber = "100";
string response_message = client.DownloadString(apiUrl +
"messages?token=kzwfwna7auyj5ubp"
);
Messsage resp = (
new
JavaScriptSerializer()).Deserialize(response_message);
var
data = resp.messages.Where(x => x.chatId == Convert.ToString(Session[
"ChatId"
])).Select(x =>
new
{ x.body, x.author, x.time }).OrderBy(x => x.time).ToList();
return
Json(data, JsonRequestBehavior.AllowGet);
}
Reply
Answers (
1
)
How to check if there is any directory available or not
getting length of an array