Sending users messages - The right way - facebook

we would like to let the logged user in our web site invite his friends to participate in some scenario, IIRC the options we have are:
Keep in mind, we MUST know which users the message/notification sent to in order to interact back with the selection.
1) Raise a request dialog, with the multi friend selector, but unfortunately the 'message' field in the 'apprequest' dialog is only displayed in the app center and is not visible in the top bar notifications. which is very important for us.
2) Send a personal message, but this has no friend selector, so we raise the 'send' dialog but the selected recipients by user are not being recieved in the callback (only status is recieved back)
This question was asked here:
When a Facebook user sends the Send dialog within an application, can the application track the recipients?
We thought maybe to raise our own dialog for friend selection, and then popup the 'send dialog' with a pre-defined recipients but the user still can change the recipient in the send dialog (there's no way to freeze the selected recipients)
So what is the solution for this requirement?
Thanks.

We have decided to go with app notifications as it's the best option for the current restrictions.

Related

Quick Replies on the Page Owner

Messenger Platform introduced Quick Replies feature, that the User can tap to answer Page Owner's request instead of typing. However, I can make it work from the User view only. Will it work from Page Owner's view, like suggestion?
Flow may be:
1. User ask Page a question
2. Bot suggest some <quick replies> based on that question (maybe use NLP)
3. Page Owner can tap <quick replies> to reply
I may call this "semi-auto reply bot". For example, in the demo here, the shop owner may double checked the response and tap to send.
No, there is not a direct way to do this. Theoretically you could basically have a customer-facing bot and a business-owner-facing bot, and then orchestrate the a flow something like this:
user messages user-facing bot
bot forwards the message to business in business-owner-facing bot with quick replies
business owner selects a quick reply
user-facing bot replies with the text of the quick reply.
You'd want to be careful of privacy concerns tho since the user's message is being forwarded on.

BlackBerry 10 / WebWorks 2 send email automatically

I'm writing an app to prepare an email message with data provided by the user in a form. Upon the user clicking "finish" in the form, the email message gets prepared on the email card, but the user still has to click Send.
I used this method to prepare the message: blackberry.invoke.card.invokeEmailComposer. How do I get the message to send immediately after the message is prepared?
That behavior is currently not available. As you describe, the invokeEmailComposer() method opens a new screen (named a 'Card') where the user can confirm/modify/cancel/submit an email.
One of the benefits of the emailComposer card is that you give the user the ability to select which email account they wish to send it from (e.g. if they have both a personal and work account on the device).

How can my app facilitate a message to multiple friends?

I have a facebook app that needs to allow a user to send a message to multiple friends (potentially all their friends) at once. This isn't any kind of spam, and I don't need the app to send the message incognito (behind the scenes), I just need to open a dialog with specific friends pre-populated (that the user has selected within my app in a prior step) and then send them a custom message. Is this possible? I see the api for sending a message to a single friend, and I see the API for inviting users to my app (but that's limited to some very small number of invitations per day)... what I need is a dialog that lets me send messages to as many of the user's friends as they want, but for me to control *which friends are selected... I don't want to give them control to add/remove from the friends list.
Is this possible?
No, the Send Dialog allows prefilling only a single friend, but would otherwise be the best option here if you need a custom message displayed to the recipient. You could get the user to send to several friends in a loop by prefilling this - or fire the dialog without prefilling and let the user chose who to send to - your app won't receive a callback with the recipient IDs but you could put a referrer param in the URL sent?
Failing that, the Requests dialog / 'invites' are the only thing you can prefill with multiple recipients without the expectation that your app will be shut down for spam shortly thereafter - there's no limit per day on the number of requests sent, but you don't get to set the message shown to the recipient.
In case this is helpful to anyone else, I just found this... it's a relatively new API (still in beta) that allows for (just about) exactly what I was asking for. I've tested it and it appears to work...
https://developers.facebook.com/blog/post/2012/08/31/reach-users-1-1-with-the-notifications-api/

Problems of inviting friends through Facebook email

I want my users to invite their friends by sending them Facebook private massage. I am thinking of using send button, but the problem is that each invitation url is different and unique, so if I use send button to do it, I might need to create many send buttons each of which carries an unique href. I think this should work? But ideally, I want users to just select their friends in a multi friend selector and everything's done by just clicking the sending button. Any ideas?
Thanks for any help!
You can generate a unique URL for the message that includes the IDs for all the users the user wants to send the message to. Then, when the recipient accesses the URL and authenticates themselves, you can cross reference the URL and their User ID to what you have in your database.
Without knowing what the message contains, its purpose and what you want to achieve, this is the best approach I can think of.
You won't be able to tell who the message is actually sent to, as Facebook doesn't return the User IDs in the callback, but if you have read_inbox permissions, you should be able to look the User IDs up that way.
i think an better way to approach this is set up an invite system, have an invitation code field in your register.php that you sign into, store that info in user account database and set an number of times it can be used

Facebook request dialog with custom message notification

I have a very simple use case. My app lets users send invitations to his friends, say for a birthday party. Friends then accept the invitation(and app).
I am using RequestDialog to send notifications to multiple users. Notification was sent successfully but the message is confusing to the user as it says
"User A Invited you to try APPNAME. Try Now".
Is there a way to customize this message? It should something like
"User A Invited you to his birthday party using APPNAME. Accept it now"
I believe I cannot use app generated requests as invitees hasn't authorized the app yet.
Any other ideas or workarounds to send notification, message with a link so users can click on it and accept the app and thus accept the birthday invitation?
You should use message parameter of Requests Dialog
message - The Request string the receiving user will see. It appears as a question posed by the sending user. The maximum length is 255 characters. The message value is not displayed in Notifications and can only be viewed on the Apps and Games Dashboard. Invites (requests where the recipient has not installed the app) do not display this value.
I memory serves, Facebook used to let you customize (many years ago), but, probably due to abuse, they no longer allow you to customize what the invitee sees. It's all standard. However, when the user comes to your app to authenticate, you can customize the Enhanced Auth dialog to your content.
I don't think there's a way to customize invite messages, and interestingly, to Usman Ashraf's point, as far as I can tell BranchOut can't do this anymore either (or at least I can't replicate it with their app). If anybody else can replicate it, let me know.
What you might want to do would be to allow
new_style_message: true,
Under your
FB.ui({
method: 'apprequests',
new_style_message: true,
message: "is bringing you to the UPicnic !",
display: "iframe"
},somefunction);
What this does is when the notification is sent to the user(s) , it will show up as the message instead. Not much customization but that's the least I can find.