简体   繁体   English

通过Facebook IOS SDK向您的朋友发送私人消息

[英]sending a private message to your friends via Facebook IOS SDK

I saw your post about sending messages to your Facebook friends via the IOS Facebook sdk, 我看到了您的帖子,内容涉及通过IOS Facebook sdk向您的Facebook朋友发送消息,

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: 如果不是这样,那么您以前的帖子仍支持将消息发送给您的Facebook朋友:

iOS Development: How can I get a Facebook wall post to show in the friend's news feed? iOS开发:如何获取Facebook墙上的帖子以显示在好友的新闻提要中?

If so let me know, thank you in advance 如果是这样,请告诉我,谢谢

It is possible to send a private message via facebook- just not with the SDK. 可以通过Facebook发送私人消息,但不能通过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 'username@facebook.com'. 您可以获取用户的“用户名”(即http://www.facebook.com/username ),并且可以通过应用程序向他们发送电子邮件至“ username@facebook.com”。

Shapow! p!

Major bonus: attach a file and it will be included in the facebook message. 主要好处:附加一个文件,它将被包含在Facebook消息中。

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. 一个警告:电子邮件将不会到达收件人的邮件收件箱,除非发件人的电子邮件地址与有效的Facebook用户帐户相关联。 I would imagine this is in place to thwart spam. 我想这可以阻止垃圾邮件。

No, it is not possible to send private messages using the Graph API. 不可以,无法使用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 . 我刚刚使用图形API Explorer工具进行了检查: 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. 我将/ friendId / feed与HTTP帖子“ message” =“ testing”一起使用,我的朋友确认他们在其信息流中看到了它。

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 并在info.plist的LSApplicationQueriesSchemes中添加fb-messenger-share-api

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM