Sending app requests from server side - facebook

I am building a facebook app where users create invitations and invite their friends to join the event. It has 3 steps and second step has a custom friend selector where I let user select some of his friends that he/she would like to invite. In step 3 after confirming I would like to send notification/message/request to invitees and I can't figure out a nice way to do that.
I can't use JS friend request as I have a custom friend selector.
I couldn't find a way to send a message from server side.
I was able to send app request but only to app users.
Is there A way of sending a little notification to user that he was invited to an event by his friend?
*Not all invitees are app users
*Not all users accepted TOS
*Don't want to post to wall until invitee accepts or rejects the invitation
Any pointers would be appreciated.
UPDATE
Hope this helps someone. Here is how I was able to send a server side request.
#oauth = Koala::Facebook::OAuth.new('app_id', 'access_token')
#oauth_token = #oauth.get_app_access_token
graph = Koala::Facebook::GraphAPI.new(#oauth_token)
graph.put_object("fb_id", "apprequests", {:message=>'Welcome to my app'})

To finally answer this question (according to the latest API Version v2.5): It is not possible to send notifications or App requests server side to users who did not authorize your App. You should use the official apprequest dialog, or other dialogs like the send dialog. Or just send emails.

Related

iphone development: sending app requests to multiple facebook friends from friendpicker

I have been searching so long bu could not find any suitable answer so if you have any idea it would be perfect.
In my app i have friendpicker controller it lists all my friends. When I select some of them and press done button I can successfully log the ones I selected. so there is no problem. But what i want to do is sending app request to the selected users. How can I do that? what I need is sending multiple app requests to the friends which are selected from the friendpicker. Thank you
(Facebook SDK 3.5)
You should design experiences into your app to allow users to send requests to friend to drive re-engagement. Some design experiences include giving users the ability to request gifts, accept gifts, or help them complete a mission in your app. For example in Diamond Dash you can send a life to a friend. If that friend has not been using the app for a while this could help re-engage them.
Another design experience to consider is to allow users invite their friends to use your app. For example, there are apps that ask users to rate the app after some time. If you wanted to build something similar to drive engagement you could ask users to invite their friends. Wherever you have a button or call to action to rate the app, think about adding a flow to invite friends.
These user-generated requests are initiated when the app enables the user to select one or more friends to send a request to.
We will walk you through the steps to send out an invite or a request:
Triggering when the invitation or request is sent
Sending the request
Sending additional data with the request, such as a virtual gift
See this tutorial: http://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/
This may help you.

How can i send app request to both FB friends and application users?

I've a situation in my application where I need to send apprequests (or any way of sending any request to my users) for both my facebook friends as well as the same application users.
The problem with this is ,
when we are sending apprequests using application itself(using app_access_token) we can't send app requests to my facebook friends who are not yet part of my application ("oAuthException : User must accept TOS" will be thrown).
So when i use the 'Request dialog' (FB.UI app request method) its possible to list/send requests to only FB friends .
So i need a solution for having a method where i can list all my user's FB friends and application users and send apprequest at once to all..
Anybody has tried something like this before?
And also i tried FB.UI (send method) and searched for graph API and also considered option of posting wall message and everything doesn't work both types..
Any help on this?
May I draw your attention to the following Facebook Documentation for AppRequests:
http://developers.facebook.com/docs/reference/dialogs/requests/
You need to have a look at the section headered "Frictionless requests".
From what I understand from this sentence:
Upon first sending a request to a friend from within an app, a user may authorize the app to send subsequent requests to the same friend without prompting for his permission.
It sounds like there is no way to "bulk" send to all of a user's friends, it is on a friend-by-friend basis. It sounds sensible to me, I wouldn't want my all of my Facebook friends to be flooded with invitations either.
You could however opt for prompting the user with the Friend Request interface which is much friendlier to your users... this is available using the Javascript SDK.

Facebook app: send message to users

I would like to know if theres a way to make my app send any type of message/notification to a user with a certain uid. Anything but posting to the users wall will be ok.
You can request the email extended permission to get the current user's email address and you can email them that way. To send a message to a users friends (without posting to their wall), the only current option is the requests dialog in the javascript sdk.
Did you gave Send Dialog a try, here is the link: https://developers.facebook.com/docs/reference/dialogs/send/
The only limitation is you have to have a url along with. The notification goes in the message timeline. Basically it is meant for sending content, not bare messages.

How does RockMelt send Facebook messages?

Everything I've read says that you can't send messages but in RockMelt you can send your friend a beta invite through Facebook messages.
Are they using a preview of the Inbox API? Is there another way they're doing this?
This was taken from an answer on Quora that Eric Vishria the CEO of Rockmelt said:
"If a user wants to invite a friend who has not signed up on our site, we generate a download link, and pre-populate a Facebook message (in our own UI) that the user can edit/tailor and click Send, or copy and send via some other means (email, chat...).
We do not auto-send Facebook messages and the messages aren't from us, they are user to user.
If a user invites a friend who has signed up on our site (via the "Hook 'em up" button) that sends a notification to our backend that a user has been hooked up and we send that friend an email that such and such user has hooked them up. We are able to do this because when users sign up on our website, they connect via Facebook and authorize our application to send them email.
We spent a lot of time making the system not spammy (no auto posts to feeds, no automatic emails, etc....) where invites go to people who want them or users have to take an explicit action to tell their friends about it."
http://www.quora.com/What-Facebook-permission-enables-an-app-to-send-user-to-user-messages?redirected_qid=97754
To send a message to a friend you can use the Send Dialog, similar to the Feed dialog that will post to the wall but it lets the user select one or more friends and send a message:
https://developers.facebook.com/docs/reference/dialogs/send/

Send Reminder application invitation to facebook friends

Can facebook send reminder invitation for application request? In my web application ,member have facility to send invitation to his/her facebook friend for join my application. I am using facebook multi selector to send application invitation. I want to send a reminder invitation after a one week to facebook user which haven't join my application. Can anyone tell me how can i send a reminder to facebook user for join my application? Can facebook give any facility to send reminder via multiselector or if facebook provide and other facility.
Plz give any suggestion.
Thanks!
What about you go about it this way:
use the facebook API to connect the user and list his/her friend on your site with a checkbox beside each.
Send an invitation to the checked friends (via a dm maybe) and save the friend list in a db (you can call the table 'invites' and should include date, invitee and status). The invitation/registeration link should include a referer id to track the invitee.
Once the invitation is honored, GET the referer id and update the status to registered (you can denote that with 1).
Setup a daily cron to check for invites with not registered status that is 15 days. Resend invite to them.
Only problem is storing the user's friends has great privacy issues. If you must do it, make proper provisions in your privacy policy.