I am trying to implement something similar to the share feature on Dropbox that allows you to send an invite to Facebook friends.
You will need to log in/ create an account and have a shared folder to see it.
The feature only ever shows one Facebook dialogue which is to give it’s app permissions – I don’t know how it even manages to send a private message – from the research I’ve done this isn’t even possible, and secondally, I don’t know how it manages to achieve it without using a Facebook dialogue – it uses it’s own modal box.
So far I have managed to pull a list of Facebook friends into a jquery ui autocomplete but don’t know how to now send the private message to the selected friend now that I have their id.
The only way I could think of how to do this was to send the user an email at id@facebook.com but don’t know how you attach the image, description, link etc like you do to a normal wall/timeline post.
I was hoping some of the Facebook experts here could offer their thoughts and opinions?
The only way that I’m aware of that enables an app to send private messages to non app users is via the Chat API.
For that you need to ask for the “xmpp_login” which:
(Permissions Reference)
When you have that you can become a xmpp client of the user, get presence updates from the user friends (and with that you can know which friends of the user are online) and you can send messages to the friends on the user’s behalf, but also here facebook asks that the message will come from the user which is probably the modal dialog in dropbox.
This api is not a simple one because it requires your app to have an xmpp client.
There are some client implementations (flash and even js clients) but I have no experience with that, on the other hand I can tell you from experience that managing xmpp per logged in client can be tricky so try to avoid it unless you really need it.
You can remove the app you have for dropbox in facebook and then add it again, then you’ll see what the permissions are and see if indeed they ask for the “xmpp_login” permission, if not please let me know what they do ask for.
Edit
You got me intrigued and so I tried it myself, and you’re right they are not asking for the “xmpp_login” permission, only “offline_access” and “publish_stream”.
I can’t explain how they manage to pull that off, they don’t do it in the client, I can see the request going to their servers.
The best guess I have is that they have special privileges from facebook, I know that they do that with some companies.
If I’m right about this, for you there are two options: use the send dialog or use the chat api.