how to send facebook Notification or message via its api? - facebook

please let me know how can i Send facebook Notification or message via its API through a facebook app?

You can use the Old REST API to send notifications to users who have authenticated your application. First you must request the "email" extended permission from the user, then you can use the notifications.sendEmail method to send them the notification.

I used this dialog to send message one my one. But had no luck to send message to facebook account successfully.
https://www.facebook.com/dialog/send?app_id=MY_APP_ID&name=Check This Website&to=MY_APPLICATIONS_USER_ID&link=MY_WEBSITE_LINK&redirect_uri=MY_APPLICATION_URL

Related

Need to send Email/Notification to Facebook User of iPhone app from server.

I have Facebook user's details Like FBid, Fb user name on my server data base. I want to send email/Notification of this user on Facebook. How can I achieve this. It is very easy to send this via my iPhone app because Facebook access token is on my device but I want to send notification via Server. Please let me know How can I send this. Thanks
What have you tried?
What I have already done : After R&D I found that "username#facebook.com" will work for send email to FB user, and it was working but after AWS setup its throwing mail bounce messages :(
http://www.facebook.com/help/224049364288051
How can I send email to a facebook friend using his facebook id via fql or graph api
Sending Email to #facebook

Facebook - Send Message To Friend(s) with / or without API in PHP / cURL?

Apparently with the Facebook API, you can only read a users inbox, not send messages. Without doing a Javascript send dialog.
I am creating a simple script with twilio where I can call in, and save a message. Then have that message be emailed to a friend, or myself.
That's done, and easy, but people don't check their emails that often as they check a Facebook message.
Question:
Is it possible with the Facebook API, or using cURl or some other method in PHP to automatically login into my facebook account, and send a message to a friend?
My personal facebook, not anyone, but have my email and password passed into it and have the script do this automatically?
Is this possible, or against Facebooks TOS to have php remotely access and use my FB account?
If someone were looking for a similar solution today, they can request access to integrate Twilio with the Facebook Messenger API here.
If you send an SMS with Twilio, for example:
https://www.twilio.com/docs/api/rest/sending-messages
https://www.twilio.com/docs/api/rest/sending-messages
from twilio.rest import TwilioRestClient
# put your own credentials here
ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
AUTH_TOKEN = "[AuthToken]"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
client.messages.create(
to="+15558675309",
from_="+15017250604",
body="Hey Jenny! Good luck on the bar exam!",
media_url="http://farm2.static.flickr.com/1075/1404618563_3ed9a44a3a.jpg",
)
You would then be able to integrate with Facebook Messenger with little change to your Twilio code.
You can try Nimrod : https://www.nimrod-messenger.io/
Your friends will have to register and give you their API keys if you want to send messages to them.

Can a Facebook Application send a message to its users

Is it possible for a Facebook application to send a message to its users ? Sending the Message that we get next to notification(inbox) .On behalf of the Application. ?
The facebook api does not allow sending private messages (inbox) at all, not for an application or a user by an application.
For user (with a user access token) applications can use the Send Dialog or the Chat API.
As for sending user notifications from the application, check the Social Channels and Requests documentation.

How do you post a link to user's inbox in Facebook?

I am a iPhone application developer. I don't know how to send an "link" to a selected user's inbox in Facebook from my Facebook account.
You can't send messages using a Facebook API from the backend, but you can do through JS SDK or redirecting user to facebook url as per this link
FYI: Send Message
I don't exactly know if I understood your question, but: If you want to provide a link that a user follows in order to go to her/his Facebook inbox, you can use the URL scheme fb://mailbox (provided that she/he has the Facebook app installed)
As #Venu wrote, the api does not allow apps to send messages on the behalf of the user, only with the Send Dialog which you should be able to open using the iOS sdk Dialog.
Another approach you can use is the Chat API with which you can send messages on the behalf of the user, it requires the xmpp_login permission and you to implement an xmpp client.

Facebook Send - How to find out who message recipients are

I'm building a site that I've integrated with FB Send. Is there any callback that will tell me who the messages were sent to if a user on my site uses FB Send?
At this time there is no callback from Facebook for the FB Send button you referenced. There is not currently any way to retrieve the list of recipients for which a user has just messaged via send button, sorry.