Send a message between application users - facebook

I want to write a facebook app in which I'll show a list of the people who gave permission to use the app.
Each user would be able to pick another user from the list and send them a message from the app.
Is there any facebook api call I can use? Or I have to develop a stand alone messaging system?

Related

How does Instagram check if the users contact are using the application?

In the Instagram app you are able to sychronize your contacts and than the app shows which of them use the application. They are probably using the Contacts framework. Are they fetching the numbers of all contacts and than comparing them in their database?
Yes, once you allow to give access to your contacts. Step #1 is to sync your contacts with their server and they checkout in their database, if any of your contact already using the app (registered to app with that mobile number), they show it for you to better getting in touch with them, otherwise shows you an option to invite them to get started.

Launch Facebook messenger Share extension from my iOS app

I'm developing an iPhone app and I want to launch Facebook messenger share extension from when user wants to send a photo to one of his friends.
How can this be done?
I was able to use FBdialog, but this takes the user our of the app and I don't like this option.
Thanks.
Your application must have received permissions by the user via the access token (publish_actions). Otherwise, you'll get into the fast-app-switch, which displays a separate page.
Once a user gives your app appropriate permissions, then your FB action can be seamless, without switching across.
In a nutshell, you should implement a "login" method that users "login" to your application using Facebook (more specifically - gives your app permissions to access certain parts of their FB profile), and then you should be able to use native SDK capabilities.
If you use UIActivityViewController as long as the shared objects (NSString, UIImage, etc) are compatible it should show up automatically on the share list sheet in iOS 8.
The user may have to enable it by pressing "More"

apple push notification with iPhone

I would like to ask some suggestions to the experts who have faced similar problem as mine.
I am developing an iPhone application almost like a social networking application. This requires inviting friends to the application. The application is integrated with Facebook for login purpose. My question is that,
1) We can identify the Facebook friends who are using our application. We need to send notification (push notification) to iPhones of the friends who are using our application. Our backend is deployed in AWS. So that we have SNS and SQS for notification purpose. But it supports email and SMS notifications. I came to know from the web that there is Apple push notification services. Can we use apple push notification for this purpose? Which one is preferred here? SNS or apple push notification. Please advice. If you have any reference sites please give it to me.
To send APNS you need to have token of the device, so you can't send such notification just with the information about Facebook account. But if you are able to know that person is friend from Facebook and he uses your app, you can store some data, like token and facebook login of every user to send them APNS. But! Apple may reject it, because they hate when developers collect data that can identify a person.
APNS is nice for that situation, but risky. (Can anyone proof me wrong or right?)
Email is old-fashioned, but legal and easy to implement, i guess. Like, twitter sends push and email.
Also, you can use Facebook features (not so nice if you will integrate more social networks)
I think that you can use AWS SNS and APNS for what you want to do. You will need the pushTokens for the app/device that you are wanting to send push notifications as they act as the identifiers for the specific app/device to use as an endpoint.
You need to set up an SNS topic. Then you need to subscribe the devices (with the apps of interest) to the topic. Then you can publish to the topic (either programatically or via AWS Management console) and that message will propagate to all of the topics subscribed devices (termed endpoints).
AWS has a tutorial that walks you through this process: I have not tried it yet myself.
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html

Showing Badges in iPhone Hybrid Application

We are developing a hybrid iPhone application. It has a webview that loads some mobile website. Website requires user authentication and once user is authenticated we need to show badge count for unread messages.
We are looking to use Push Notification to show badge count but I am not sure how should we register for push notification dynamically once user log-in and de-register once user log-out.
I believe if we can have some way to invoke native class method through javascript then we can achieve it.
Please suggest.
It is very simple whenever user logged-in, post a entry into the db and send notification for the records entered into the db and when user logging-out delete the entry from db

Send a message to a Facebook profile using an iPhone application

I am creating an iPhone application using the Facebook SDK. How do I post a message to a selected friend such that the message can be found in their profile?
I have no idea how to implement this.
Facebook does not allow messages to be sent via the API at this time. Applications can send notifications, but nothing but Facebook has access to the message/inbox API yet.