predefine message facebook send button - facebook

I would like to use the fb send http://developers.facebook.com/docs/reference/plugins/send/ button but would also like to predefine the message so a user does not have to think about what to say and only fill out the recipients. Can this be done? And how?

As far as I know Facebook APIs do not let you to format or send messages on behalf of you to your friend. That would be pretty spammy.

Maybe you could try to use javascript and jquery in order to set a text message in the textarea when your user click on the Send button, just look for the class of these elements and create a quick script.

Related

How to set starting options in facebook messenger for pages?

Is it possible to set starting options in facebook messenger for pages like example bellow:
example of expected result
I figured that similar could be achieved by using messenger BOT with 'start button', multiple BOT replies with 'quick reply' buttons and passing conversation to live chat in required cases.
The problem with this is that after user clicks 'get started' button BOT publish text replay 'Get started' which is not desired.
I wonder if there is an build-in setting to achieve this? If not, how would one solve it?
EDIT: It seems to me, it is not possible to build something like that neither with facebook quick reply neither with templates/buttons
EDIT 2: I also tried doing this in Facebook's page settings with no result. It seems it doesn't have anything to do with Facebook's 'quick replies'
First of all there is no way to set those options from facebook platform itself. Those questions are generated by facebook to give user a head start to a conversation and those are generated based on the type of page you are created. To see the option go to
Your Page's Settings-> Messaging -> General Settings
It is ideal that you will configure the 'Get Started' to initiate conversation with your bot and then show users a bunch of options using various templates like quick replies, carousel, list etc. By this way you have full control over your templates and expected answers.
But then again if you want to use those generated options from facebook then you can look for those option's text in the delivered json to your configured web hook. Here is a sample json:
{"object":"page","entry":[{"id":"","time":1519980744192,"messaging":[{"sender":{"id":""},"recipient":{"id":""},"timestamp":1519980743903,"message":{"mid":"","seq":1,"text":"Could you give me a call? I'd like to speak to someone."}}]}]}
Look at the 'text' attribute. The text is from after clicking one of those options. But again this is not ideal as the options can get changed anytime by facebook's algorithm.
My suggestion is to use 'Get Started' button and then send a list to the user.
The screenshot you posted shows a features that is currently being tested for Pages, so it is not available to every Page. There is no built-in way to do this, other than sending quick replies in response to the get started postback, messaging_optins or messaging_referrals events.
You can create a persistent menu to achieve this.
Here are few video tutorials I created to help you with Facebook integration and sending rich messages in facebook messenger through Dialogflow.
https://www.youtube.com/watch?v=fJ4HoYxoKl8
https://www.youtube.com/watch?v=JC9Y-AmcL6A

URL for compose Facebook Message (new layout)

I've use following URL to send message with prefill text.
http://www.facebook.com/messages/[user]?msg_prefill=[message]
ex. http://www.facebook.com/messages/facebook?msg_prefill=hello
But msg_prefill parameter seem to be depreciated on new Facebook Message layout.
http://mashable.com/2012/08/22/facebook-revamps-messages-to-look-more-like-email/
Does anyone know how to add prefill message for new layout?
I still can't send message with prefill text. But I've found another way to send link using Send Dialog.
https://developers.facebook.com/docs/reference/dialogs/send/
ex. 1
https://www.facebook.com/dialog/send?app_id=123050457758183&to=zuck&name=Hello&link=http://www.google.com/&redirect_uri=http://www.facebook.com/
However this may not working for some people (including me) as using some domains in "link" parameter cause error as this bug.
http://developers.facebook.com/bugs/284149695026014?browse=search_509788e98cb627971133933
ex. 2
https://www.facebook.com/dialog/send?app_id=123050457758183&name=People+Argue+Just+to+Win&link=http%3A%2F%2Fwww.facebook.com%2FCili.Pica%2Fapp_469715143040257&redirect_uri=http%3A%2F%2Fwww.example.com%2Fresponse
Also, Send Dialog links can't use on iPhone apps, Android apps and mobile version of facebook.
ex. 3
https://m.facebook.com/dialog/send?app_id=123050457758183&to=zuck&name=Hello&link=http://www.google.com/&redirect_uri=http://www.facebook.com/

How we can change facebook apprequest messages

Is there any way to customize apprequest message of facebook?
e.g. if a person sends request to his friend then default message comes "Shahid sent you a request in FarmVille"
here Shahid is username and FarmVille is an app name.
screenshot is given below
screenshot http://www.ogilvyapplications.com/temp/apprequest.jpg
You can only customise the message for where it appears in the Games and Apps dashboard, the notification in the dropdown will always have that default text. See the Requests docs for more information.
you can see in the screenshot above that the text CAN be edited. it almost always is "... sent you a request in ..." but there are some different ones, like "... wants to include you as a professional connection in ..."
i still didnt find out how to change it though
maybe you need to add "verbs" to your apps (in this case - "include" you as a "professional connection", or something like that) and thats the only way to change the text?

Facebook Style Message Popup?

My site has a Send Message button next to the link to a users profile. When the user clicks on it (using the onClick handler) I want to open a Facebook-style message window, instead of a new window (window.open() method).
It doesn't have to be exactly the same as Facebook's, but I want a similar kind of thing.
Check out Jquery-UI. they have a lot of popuppable windows. Probably want to couple that with some Ajax, and bam, dynamic message popups.

What is the easiest way to open a popup window to send an email?

What is the simplest way to open a pop-up window, sending it information from the current page, allow the user to fill out a couple of fields and send an email, and then return to the original window as soon as the email was sent - using Coldfusion?
If you are using ColdFusion 8 or higher then I will suggest you to use CFWINDOW which will be simply div and can load content through ajax or just pre populated div can be convert to cfwindow and use modal version so it will not let user to use main page content. Also on send of email you can close cfwindow using javascript.
If you are using lesser than 8 then same thing can be implement using Fancybox or lightbox as well.
If you want to use native HTML, my best advice is better use modaldialog box. After that, passing parameter from modaldialog box and display at parent page.
I ended up using a simple javascript Window.Open, passing the parameters in the url.
Maybe not the best way, but definitely simple.