sending a private message to your friends via Facebook IOS SDK
Asked Answered
R

3

8

I saw your post about sending messages to your Facebook friends via the IOS Facebook sdk,

I was wondering if there is a way to send a private message as well to these friends.

If not, is sending messages to your Facebook friends still supported from your previous post at:

iOS Development: How can I get a Facebook wall post to show in the friend's news feed?

If so let me know, thank you in advance

Ramonramona answered 14/4, 2011 at 15:16 Comment(1)
Absolutely impossible from Jan 2013, completely banned by Facebook developers.facebook.com/blog/post/2012/10/10/… You can only send an email (ie, private message) as explained by KLEW below.Emptor
K
12

It is possible to send a private message via facebook- just not with the SDK. You can get the user's 'username' (ie. http://www.facebook.com/username) and you can send them an email via your app to '[email protected]'.

Shapow!

Major bonus: attach a file and it will be included in the facebook message.

One caveat: the email will not reach the recipient's message inbox unless the sender's email address is affiliated with a valid facebook user account. I would imagine this is in place to thwart spam.

Kings answered 6/8, 2012 at 3:37 Comment(6)
Hoiw can I get the user's username?Inflorescence
Graph API Provide user name. Thanks KLEW for now it is working :) +1Dotterel
Note - this now goes to the "Other" section of a user's messages inbox and does not send them a notification. At this point it's pretty much useless.Blacksmith
If you are sending to one of your facebook friends, it won't go to the "Other" section, but rather, your main inbox.Kings
@Maggesh how to get friend username please helpEndurance
@Kings i want to send text to fb user but users don't have username of fb account in my app. can i send text to fb user account?Smaragdine
M
1

No, it is not possible to send private messages using the Graph API.

Yes, it is still possible to post to a friend's wall. I just checked it out just now using the graph API Explorer tool: http://developers.facebook.com/tools/explorer. I used /friendId/feed with an HTTP post of "message" = "testing" and my friend confirmed they saw it on their stream.

Mosenthal answered 9/2, 2012 at 19:27 Comment(1)
In fact, it is now not possible - it was deprecated by Facebook January, 2013: developers.facebook.com/blog/post/2012/10/10/…Emptor
I
0
let messageDialouge = MessageDialog.init(content: <ShareContent>, delegate: nil)
   if messageDialouge.canShow {
        messageDialouge.show()
    }

And do add fb-messenger-share-api inside the LSApplicationQueriesSchemes in info.plist

Inspectorate answered 25/6, 2019 at 4:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.