Send a message as a user to another one - facebook

Is it possible to send messages as a real user (not a page. For example myself) to another user using the Facebook Graph API?
In other words, can I create an app that will make an API call which will send a message as myself to a friend of mine (as if I have sent it myself)
The send and conversation API seems to be only about sending and receiving messages as a page

No, there is only an API for Page to User communication, but not for User to User communication.

Related

Is there a way to send the response that's returned from dialogflow (fulfillment) to another account

I am using slack with dialogflow fulfillment to create a chat bot.
Can userA send a message to dialogflow and dialogflow return a response to userB?
This is not possible, the WebHook responses goes in the conversation which originates the call.
You can create a custom logic (in your Webhook) to initiate a message to another user. This depends on the Channel, for example with the Telegram API you can notify a user having his/her chat ID.

Facebook Webhook Event block

I'm writing my facebook-chatbot and i need to register users who are turned off receiving messages from my bot. Is there any facebook webhook event, when user blocks bot messages? I need event like vk api message_deny.
There is no way to explicitly tell that the user blocked your bot, but as #CBroe mentioned in this comment, you will get an error response from the API when the message fails to be delivered.

Facebook won't send notifications from messages sent by a user that was transferred from a bot to the facebook page inbox by the Handover Protocol

I will name my firstborn after whoever answers my question!
My bot uses the Handover Protocol to transfer users from the bot (primary receiver) to the page's inbox (secondary receiver) after they tap on a 'chat with human' button, the problem is that I'm not getting any facebook notifications when the user starts messaging a human (page inbox).
Right now I'm having the bot email me anytime it transfers a user to a human but this fix obviously doesn't scale, ideally I would want facebook to send me notifications on my phone just like it does by default to pages that receive messages and don't have any bots installed.
I know I can see the messages sent to a human by using the 'standby' webhook but those are developer-side server logs, what I want are normal facebook notifications sent to the page owner and the people in the page's Roles so they reply to those messages instead of me (the developer) being the only one being notified through emails I have to send myself.
1.You have to go to Your Page--> Settings--> Notifications--> Select this option
from Messages- "Get a notification each time your Page receives a message".
2.Download "Facebook Pages Manager" App to get all your page related notification
on your phone.

Maximum number of Facebook private message sent by Graph API (per day)

I am using Graph API to send private message as shown in this documentation
https://developers.facebook.com/docs/reference/api/message/
Now, I want to ask about the Maximum number of Facebook private message sent by Graph API (per day)
Thanks a lot
Thankfully, applications can not send private messages via the API (or any other methods).
What you are looking at is the documentation for reading the inbox.
Facebook Chat API is the same as private messages.
An easily way to test is, install Pidgin and log in Facebook Chat with pidgin.
Try to send some messages to other friends and browse "Messages" section in Facebook website.
You will find that all messages sent through Pidgin will appear in Facebook Messages.
And also we could use me/inbox or me/outbox connection of Graph API to retrieve those messages sent through Pidgin.
It is the only way to send messages to friends as I know.
Without special API key in whitelist, it could not send private message by Graph API.

XMPP Framework: Not able to receive my messages

I am working on xmpp framework. I have done most of initial things. I created stream, Connected it and get authenticate. Now I am sending buddy request to another user from my app. App shows presence is sent. When I get roster it shows a entry there. But on other system I am not getting any precence or anything. I tried to send a message message is also not received by other client.
Than I used one id in ichat and send friend request to that id. Wow I am able to see friend request on ichat. I accept request from ichat :( No notification on my app.
If I send message to ichat. Message shown in iChat. but when I send message to my app from ichat.. My app is not getting any delegate called or nothing.
I don't know why this is happening.
I am using a non ARC xmpp framework.
Please guys Please help me. I am badly stucked in it :(
Thanks in Advance.
Have you consider to send presence after get authenticate?
If you are authenticate but not sending preence than server will consider you offline and all messages sent to you will be stored on server with delay.
Send your presence and see the magic. :)
I am not an iPhone developer so i can not explain programming.
In XMPP, Presence subscription has two handshakes. Like When first user send request to second user , it will ask for presence subscription to second user. When second user accept , then first user is subscribed for second user's presence. So he can get all the presence of second user. It's called "to" subscription type for first user. Now second user ask for presence subscription to first user and first accepts request then this "to" subscription type changed to "both" subscription type. Now both user can get presence of each other. otherwise only first user can get presence of second user.
And for messages, there must be a some prob with listener.