Lina Clark
Lina Clark

Reputation: 243

How to send private message to facebook user using java

I want to send private message to my friends on facebook using java. I have already searched enough on Google about this. It seems earlier it was not possible but it is possible as i have seen this on many sites.

I also have read enough posts on stack overflow but could not find the answer.

please can someone point me in the right direction.

Thanks a lot...

Upvotes: 2

Views: 8018

Answers (1)

Nitzan Tomer
Nitzan Tomer

Reputation: 164397

what sort of application are you talking about here? is it server side java? desktop java application? can you use some sort of facebook sdk?

you basically have two possibilities:

(1) the fb chat api (https://developers.facebook.com/docs/chat/) it's a xmpp (like) protocol, and once the user grant you the permission you can connect on his behalf to the fb xmpp server, and send messages as the user.

(2) the send dialog (http://developers.facebook.com/docs/reference/dialogs/send/) for this you need to actually open a fb ui dialog for the user, with which he himself can send a message. for this you need to have a ui.

Upvotes: 2

Related Questions