简体   繁体   中英

Can we send message from iOS app to facebook messenger programmatically

I am working on an ios app and app has Instant Messaging feature from which user can send messages to each other. My requirement is that if user send message to any other user then that message also send to other user facebook messenger app automatically. Is that possible?

No this isn't possible. It would be a violation of privacy and could be construed as spam by the receiver of any messages that you send programmatically. The link you posted in your comments is 1) deprecated and 2) is for allowing the user to message through facebook via your application, not for you to send messages. At best you can request permission to read a user's inbox or an inbox of a page, the read_mailbox or read_page_mailboxes permission.

https://developers.facebook.com/docs/facebook-login/permissions/v2.3

Look there for a list of Facebook permissions you can ask for. And before you post a question like this, please please please take the time to Google search. It took me no more then 5 minutes and it's a burden on the SO community when easily searchable questions like this one are asked.

If you want to build a chat application however, there's a lot of great options you can look at.

First, is building your own chat application using WebSockets. This is the harder option because you'll have to build your own socket server which I would do using Socket.IO (I believe they have a library for server side and iOS as well).

The easier option is to use Layer . It's a chat SDK you can use with iOS, Android, etc. Pretty easy to get setup and easy to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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