How to send message in facebook?

Posted on Updated on

How to send message in facebook?

We are use facebook daily but we now how to send message to our friend its by just click the friend name and open the chat box and a text box is use to write the message and a button use to send a message. But in technically we don’t know how to send the message. Lets talk about the internal processing and logics of the sending message. We all know only these three step :- 

65145

Some steps to make it :

Create a div where we can chat with a text box and a button with help of html code and give a design to chat box.

<input type=”text” name=”mesage” id=”text-sms”/>

<input type=”button” name=”btn” value=”send” id=”send_msg”>

Now write the ajax code in the jquery to fetch the value of the text sms when user write and send the message the value of text box and session id of the user and message and id of user whom user send the message this information send to the php page where we write the insert code for insert the value into the table.table columns are id,from,to,message and message status(0=unread,1=archive,2=read). And it return the value with the select query to the ajax on div chat_box.

$(“#chat_box”).html(result);

In php page it will always call when we click on the button.we make a condition if session id match with from it will display the me and if it will not match with the from message it show the name of the user and dispay the chat .

Now come on status of the message ::

When we open our chat box and the all unread message color change as we open the message they change the color how its work?

It check the status option if status==0 then the color of the message is dull and unread when we click on the message it will show color less and mark it send the request to the table with update query and update the status as action preform.

For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.

Helpline: 9814666333, 8699444666

Email:info@technocampus.co.in

**************************************************************************************************************

Please fill the FORM and we shall contact you soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s