I'm building an iOS app that allows users to "invite friends" to fun events they're planning within the iOS app. One way to invite a friend is via SMS (we use Twilio and it sends out the message "John has invited you to Soccer Game" in the background).
Can we do this with FB Messages/Messenger? So if you don't have someone's phone # but you are connected to them via FB, can we send a Messenger message in the background?
(All I've found so far is App Requests but they seem to popup an ugly dialog box asking the user to hit "send" when done).
There is the Chat API, although it´s not built for auto messages but for...well, chats: https://developers.facebook.com/docs/chat/
"Please do not use this API to send spammy messages to users. Facebook
takes user experience and spam extremely seriously and if users report
your app as using the Chat API to spam them, we will disable your
app."
Afaik that is the only way to use the message inbox without any popup, but i would suggest not even thinking about going that way as it would surely be spam (=unrequested advertisement) and Facebook would definitely remove your App sooner or later ;)
Related
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"sms://"]];
I used this api to redirect user to default SMS app of ios but it creates a new message but what i dont want to create a new message but just want to show inbox of default SMS app. Is it possible using the above api in ios8.
I do not believe this is possible. Apple never allows an app to access messages or receive messages, it can only send messages through their API. This is done for security purposes on the users behalf. They don't want app companies to be able to read user apps. The only good way to do messaging is to create your own messaging service using a database and you can link their phone number to the account so the user has to verify their phone number. This allows another user to enter their phone number and text them as if SMS, but instead it goes over the data.
According to the docs, you can only open the Messages app with
the default "New Message" view ("sms:")
the "New Message" view with a given phone number ("sms:1-408-555-1212")
=> The answer to your question is NO.
I want my app to create a new Facebook group chat with certain people that opens either on Facebook's site in Safari or in the native Facebook app when the user presses a button. I want Facebook to handle the whole chat and my app only to initiate it somehow in the cleanest and least involved way possible. My app already uses the Facebook SDK to open an active FBSession, so I've already got login credentials.
Looking around online and in Facebook's docs, I can't find anything that suits my needs. The closest thing I found was in this answer containing a list of Facebook app URLs you can connect to that open the Facebook app to certain pages. There's "fb://chat/(initWithUID:)" and "fb://messaging/compose/(initWithUID:)". However, not only is there no explanation on how to use these, but people say that Facebook has changed these URLs (and does not have any documentation on them), so they don't work anymore unless I reverse-engineer new URLs (which could change again). Ugh, so close!
I also found examples on starting chats with the Facebook Chat API, but that involves logging into Facebook using some networking framework then writing my own GUI and model for sending messages, which I am only prepared to do as a last resort. There should be some way to let the Facebook app or website do all that. Does anyone know how I can do this?
I've found something very close, but I still don't see a way to make my app initialize it with the desired group of friends:
The Facebook SDK has a message dialog that can appear for sending messages to friends. This isn't exactly what I wanted but is good enough because it means that all the programming is already done for me by Facebook, and users should be able to see these messages on https://facebook.com and the Facebook apps. https://developers.facebook.com/docs/ios/share#message-dialog
My iOS app gives the user the option to login using their Facebook account. I would like to be able to see the list with all the friends and invite the ones selected to use the app. The problem is that using the app request window, the friends get a notification that is displayed somewhere in the App Center, rather than in the Notifications panel. Unfortunately, this sort of notification is very subtle and might not be seen only after a long time.
From obvious reasons, I cannot fetch the emails of friends as this would be a great alternative.
Do you know if there is a way to send a Facebook Message or some other sort of notification that is more 'visible' to the receiver? Thanks!
I'm not sure if I completely understand your problem. If it's the problem that I think you're having, it sounds like you need to fill out more information on your Facebook App's configuration page.
From what I remember when I had this same issue, you need to have a Canvas URL set in your Facebook App's configuration page. Even if your app is not going to use Canvas, you need to have that part filled out in order for your friends to receive the app's notification jewel on Facebook.
I have implemented the ability to receive facebook requests in iOS through deep linking. But it seems like to get the request, the user has to tap on the request in the Facebook app, which then opens my application.
This works, but I don't want to go through the Facebook app. I would like the app to be able to poll (or be notified) for incoming requests so that I can display them in a custom inbox. Just like Candy Crush or just about any other mobile game with an inbox.
Is this possible with the Facebook SDK, or are these apps implementing their own custom messaging system? And if so, how is it done? I can't find any facebook example code that demonstrates how to implement this flow.
The answer is pretty simple. Just send a request to
https://graph.facebook.com/me/apprequests
Let me start by saying facebook's developer documentation sucks. Bad.
I'm using the facebooker plugin in rails to let users sign up through facebook connect. Now when certain things occur I want to send notifications to certain users through facebook. I heard some say that notifications must go from one user to another, but I've seen evidence otherwise. I signed up at the site http://www.meetingwave.com/ through fb connect, and now they send me (annoyingly) daily notifications of new things on their site. Also, using the comments widget on my own site www.tmatthew.net, when an anonymous user leaves a comment I get notified of that as well.
So uh, how do you do that? I've been googling all week long and can't seem to find anything. It seems like I should be able to send a notification from my app to one of it's users.
The api call you are looking for is called Notifications.send. The only thing is that they will be disabling it very soon so there is probably no point in implementing it into your application.