I would like to know if theres a way to make my app send any type of message/notification to a user with a certain uid. Anything but posting to the users wall will be ok.
You can request the email extended permission to get the current user's email address and you can email them that way. To send a message to a users friends (without posting to their wall), the only current option is the requests dialog in the javascript sdk.
Did you gave Send Dialog a try, here is the link: https://developers.facebook.com/docs/reference/dialogs/send/
The only limitation is you have to have a url along with. The notification goes in the message timeline. Basically it is meant for sending content, not bare messages.
Related
I am working on a business application which is using facebook and I need to send a private message to a connected user friend.
For getting all the user friends, I am using me/taggable_friends. In this way I have all the user friends but I can't retrieve the real friend user id. I need to know this field for sending a private message (or request or notification).
Regarding the FB documentation, this feature is only available for the "games" product but it's look like strange.
Maybe i'm doing something wrong but I don't understand how should I proceed.
Thank's for your answers.
taggable_friends can (and should) only be used for tagging friends, you donĀ“t even get an ID with it, only a tagging token (see Facebook docs).
For sending private messages, the best (and only) way is to use the Send Dialog of the JavaScript SDK: https://developers.facebook.com/docs/sharing/reference/send-dialog
The user has to input the target friend and the message on his own, which is a requirement for the message anyway. It always has to be 100% user generated.
The Chat API is deprecated and should not be used anymore: https://developers.facebook.com/docs/chat
On iOS, if you want to send a private message to another Facebook user, you should use the Message Dialog: https://developers.facebook.com/docs/ios/share#message-dialog
This lets a user share a message with any of their FB friends, then return to your app. You can ensure the message contains a link which the recipients will be able to click on.
I use facebook SDK javascript to post a message from a website to my wall on facebook.
When I post, I can choose the users who can read my message.
Can I change the script to send a message directly to one or any users automatically?
To send a private message through facebook API is not intended behavior. to prevent spam it is assumed. This can be overcome by sending an email to facebook_username#facebook.com and it will appear as an instant message to the user. This is NOT an intended solution however and it is EXPRESSLY discouraged in the facebook docs.
I am building a facebook app where users create invitations and invite their friends to join the event. It has 3 steps and second step has a custom friend selector where I let user select some of his friends that he/she would like to invite. In step 3 after confirming I would like to send notification/message/request to invitees and I can't figure out a nice way to do that.
I can't use JS friend request as I have a custom friend selector.
I couldn't find a way to send a message from server side.
I was able to send app request but only to app users.
Is there A way of sending a little notification to user that he was invited to an event by his friend?
*Not all invitees are app users
*Not all users accepted TOS
*Don't want to post to wall until invitee accepts or rejects the invitation
Any pointers would be appreciated.
UPDATE
Hope this helps someone. Here is how I was able to send a server side request.
#oauth = Koala::Facebook::OAuth.new('app_id', 'access_token')
#oauth_token = #oauth.get_app_access_token
graph = Koala::Facebook::GraphAPI.new(#oauth_token)
graph.put_object("fb_id", "apprequests", {:message=>'Welcome to my app'})
To finally answer this question (according to the latest API Version v2.5): It is not possible to send notifications or App requests server side to users who did not authorize your App. You should use the official apprequest dialog, or other dialogs like the send dialog. Or just send emails.
I've noticed that I can send email to username#facebook.com and it will get delivered to a user's Facebook inbox. Is this allowed to be done programmatically (eg send via SendGrid to re-engage users)?
Does anyone have any experience doing this? If it's allowed is there anything to watch out for or be aware of?
You can do this programatically, but Facebook is smart about it. If you get an email from someone Facebook doesn't know or you aren't friends with, then it will go to the Messages->Other section. If it's an email that maps to a Facebook profile that is your friend, it will show up in your inbox.
Everything I've read says that you can't send messages but in RockMelt you can send your friend a beta invite through Facebook messages.
Are they using a preview of the Inbox API? Is there another way they're doing this?
This was taken from an answer on Quora that Eric Vishria the CEO of Rockmelt said:
"If a user wants to invite a friend who has not signed up on our site, we generate a download link, and pre-populate a Facebook message (in our own UI) that the user can edit/tailor and click Send, or copy and send via some other means (email, chat...).
We do not auto-send Facebook messages and the messages aren't from us, they are user to user.
If a user invites a friend who has signed up on our site (via the "Hook 'em up" button) that sends a notification to our backend that a user has been hooked up and we send that friend an email that such and such user has hooked them up. We are able to do this because when users sign up on our website, they connect via Facebook and authorize our application to send them email.
We spent a lot of time making the system not spammy (no auto posts to feeds, no automatic emails, etc....) where invites go to people who want them or users have to take an explicit action to tell their friends about it."
http://www.quora.com/What-Facebook-permission-enables-an-app-to-send-user-to-user-messages?redirected_qid=97754
To send a message to a friend you can use the Send Dialog, similar to the Feed dialog that will post to the wall but it lets the user select one or more friends and send a message:
https://developers.facebook.com/docs/reference/dialogs/send/