How to use the facebook send dialog but send a message and not a link - facebook

Everythin is in the title :
I want people that are on my website to send facebook messages between each others (between respective friends) : they signup on my site with their facebook account, and I know their friends. I just want them to easily talk between them without having to switch to facebook.
Or at least, if that is not possible, I want to open a new tab with their facebook on messenger with a prefilled to: field.
I never imagined this information could be so difficult to find

Related

Facebook Oauth-enticated users, chat between themselves on website

I have a website where users log in with Facebook. Right now there's no way for users to contact each other.
I was thinking of building a dedicated live messenger with sockets, but I wonder if there's an easier way to allow them to send messages to each other's Facebook Messanger, since they are already logged in with facebook.
There is no API for a chat between two users. Everything in Messenger API is focused on communication between a user and a page.
At most you can use the Send dialog to let a user send a link to their friends, but that requires the user actively using the button, you can not “automate” that; and handling the result will have nothing to do with your site any more, everything after that will happen in messenger only. https://developers.facebook.com/docs/sharing/reference/send-dialog

Allow my app users to share URLs on their wall - and count the number of shares per user

I have a FB app written in Drupal + PHP + JS. The user can already connect to my app using the "Drupal For Facebook" module (http://drupal.org/project/fb).
I present several external posts to my app users, each one with it's own URL, with a share/like button next to each which is supposed to allow the user to share that URL on his wall.
I have the following requirements:
When the user clicks the button, I want a dialog to open allowing him to post the specified URL as a message to his FB wall.
When the user posts the URL, I wan't to know it and count it in his user profile.
Questions:
What is the best way to do it?
Can it be done with an FB Share / Like / Send button?
Or do I need to construct my own post and send it on behalf of the user? In that case which permissions I need for my App?
How to actually do it ? (A code sample would be great).
Remember that I have to count the actual shares per user
Thanks in Advance,
Ammnon
try the following json codes, seems works for the 4 major social networks http://www.internoetics.com/2012/05/16/count-shares-to-facebook-twitter-linkedin-googleplus/

How to invite users' friends via facebook?

I'm looking for a simple way for users to be able to invite their friends to follow them on my website.
E.g Bob invites sally to be a follower of Bob on mysite.com.
I was thinking of doing this via requests, however I've read that they only work for canvas apps and not regular websites, meaning if Sally accepted Bob's request, then my website would be loaded as an Iframe within facebook, this would break the layout of my site and won't look good.
Is there any solution, like showing users a link within the canvas which they can click to have canvas turned off and have them sent to my website?
In the facebook TOS it says that a canvas can't exist just for redirecting users, and yet it says that facebook requests should be used for inviting users to your site.
My question is, then what would be the proper way for a website to let their users invite their friends from facebook?
I think that the only way you can do that with facebook is by sending private messages to the invited users which contains the link to your "invite url".
You can use the Send Dialog with the link parameter being the invitation page for your site.
The problem with this method is that you can not control the message that is being sent, you can however put the needed info into the og tags of that link which are added to the message.
Another approach is to use the Chat API where you have complete control over the messages that are being sent.
Problems with this method is that you'll require an extra permission (xmpp_login) and that you'll need to implement a xmpp client.
This is probably an overkill.

apprequest for a website

I m workin a projet and the marketing dep have the clever idea to a "invite friend" (apprequest) dialog on the website (with facebook connect)
I would if it is possible , as I read that on the facebook online docs
Requests are only available for Desktop Canvas apps and not website
However, the dialog displays anyway , but no notification are sent.
You'd have to have a canvas implementation in order for the requests to be displayed and for users to be able to accept them.
If you can't do this, maybe look at using the Feed Dialog for an alternative way to get a user to post a link to your app
Others may suggest setting up a canvas URL solely to redirect back to the website but be aware that that's against Facebook policy I.12

How to add a "Suggest Our FaceBook Page to A Friend" interface on a website?

With the many programming tools from FaceBook, like FaceBook connect, graph api, etc...
Is there a way to create a form on a website that does this:
I. Website visitor logs into FaceBook (from my website)
II. Form changes. Website visitor is presented with button:
"Invite FaceBook Friends to Like Our FaceBook Page"
III. Form changes to new interface. User is able to view his friends, choose specific friends and suggest FaceBook page to them. User clicks submit button.
IV. FaceBook page is suggested to friends. Data is sent to custom website application/DB to track the FaceBook info of the person who made the suggestion(s).
The whole point of this is that we want to offer a people who refer their FaceBook friends to our FaceBook page some sort of incentive (free product) and we need a way to encourage & track that.
You can refer to this for login with Facebook and knowing whether the user is connected or not: http://developers.facebook.com/docs/guides/web#login
To present the user with an "invite friends" type of interface refer to http://fbrell.com/xfbml/fb:server-fbml-multi-friend-selector
You will notice that the <fb:request-form/> tag takes a content attribute that contains a <fb:req-choice/> tag. This tag contains the url where people accepting the invitation will be directed. You can use this url to refer the person who sent the invitation. By adding a query parameter with it's Facebook id for example.