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

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.

Related

Is Facebook now anti-social, or is there hope for connecting users with their friends via API?

My latest project has (had) a requirement for the user to invite their friends to their online service. I discovered that, apparently, as of April 2015 with the new v2.0+ Facebook Graph API, you cannot actually get a list of friends for the user, unless those friends are already subscribed members of your app.
The scenario:
My app is a web service that lets the user collaborate on research work in a private group online. The user needs to
look up their list of friends,
set permissions their friend will have in the group, and
send them an invitation both join the service, and the specific group. (using a unique, one-time use link tied to each recipient)
The user would (ideally) receive an invitation with a specific link for them to not just become a subscriber of said online app, but specifically to join the group they were invited to (i.e. not just a generic "hey, check out this app" type of invitation).
The expectation:
The user doesn't care whether their friend is already a member of "MyApp.com". They expect to simply look up their friends just like they do today from their phone when they connect it to Facebook (makes all contacts available, regardless of whether those friends connected their Facebook to their phone, respectively). Likewise, compare inviting members to your Google docs, for example: look up your contact, set permission, send invite - so easy. Users demand this UX simplicity today and do not distinguish or care whether they are dealing with email, Facebook, Twitter contacts, whatever.
The problem:
The entire point of a social network is to be, well, social. If the Graph API only lets my app access friends that are ALREADY users of my app, it completely defeats the entire purpose - it cuts my user off at the knees, kills UX, no more ability to actually contact their own friends. My understanding is Facebook made this change to prevent developers from spamming users, and I get that, I completely support that. HOWEVER, my company and my app are not the ones that are trying to invite friends for it's own purposes, it is the USER and THEIR OWN friends that THEY have the right to access and converse with for their purposes (or so you'd think). Beyond just friends list, even if I had that, I think there are additional hurdles and limitations with posting messages to friends, even private (not wall) messages, which again would be anti-social.
The Question:
Am I understanding Facebook limitations properly, and if so, what is the work-around? I'd be ok with such an API being locked down until you pass a review that proves you aren't spamming users, but I did not see such an option.
Facebook supposedly prioritizes users over developers, and these changes were made because if the user is not comfortable with privacy (don't spam my friends), then they wont be users any longer, and that obviously affects developers and Facebook. OK, but did they not realize that by locking it down this extreme just killed UX for the user in legitimate scenarios? And to my original point, not just a little, but paramount - the result quite literally is that on April 30, 2015, Facebook became anti-social. Surely this is not inline with their mission. Surely there is a better approach.
If your app is not a game (which I assume), the only viable option would be the Message Dialog as desribed at
https://developers.facebook.com/docs/apps/faq#friend_invite
If your app is not a game and has a mobile or web presence:
You can also use the Message Dialog on iOS and Android, or the Send Dialog on Web. These products let a person send a message directly to their friends containing a link to your app. This type of message is a great channel for communicating with a smaller number of people in a direct way. The Message Dialog and the Send Dialog both include a typeahead which lets the person easily select a number of friends to receive the invite.
You might also find App Invites useful but I beleive it's only for iOS and Android apps and might not exactly fit your use case:
https://developers.facebook.com/docs/app-invites
App Invites are a content-rich, personal way for people to invite
their Facebook friends to a mobile app.

Send app invite request for a website to all friends of user?

I implemented a custom friends selector to send app invite requests for my website to a user's FB friends. But that show no of limitations, first that invitation may be sent to at max 50 people. I have seen games on FB sending app invite requests to user's all friends, wont that same kind of invite work for my website ?
Secondly Using the requests dialog with friend selector, there is no way to select all friends for invite. How could I make it better towards sending app invites to user's all friends ?
At some places in the FB devlopers docs, they mention explicity games & apps on facebook. If I am a website with a FB canvas page as well. Can I use the services availble for games on facebook? (Is it Legal ?)
App requests are for games, not for sharing a website.
The only serious (and not spammy) way to share a website on Facebook is to use the Send or Share Dialogs:
https://developers.facebook.com/docs/sharing/reference/send-dialog
https://developers.facebook.com/docs/web/share
You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app

Sending app requests from server side

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.

Facebook app users notifications

I'm wondering, is it possible to notify every user of a Facebook app?
This is what I would like to do:
Let's say I have a Facebook app with 20 000 users and there is new content in the app. Is it possible to send out a message, wall post, notification, .. to each and every user to let them know there is new content without being banned by Facebook?
grtz,
bundy
You can track all the users (and their friends) by id who view the app. If you have prompted the user for the app to allowing posts/sharing etc you can post to users and their friends walls usin those ids. However there is a limit (My account got blocked for a couple of days for for sending approx 600 "Shares", by mistake ..logic error that kept posting... and the app was in sandbox mode, so the rules still apply)
So to answer the question, I would say No. not by wall posts/shares, but you could collect their email address and send them a mail externally with a link to the app.
My experience of FB is using the javascript api to create notifications and posts, I am not sure of the limits in this api and do get confused between "feeds", "Shares", "Notifications" etc... FB is not quite an exact science, it would seem.

Facebook: Limit on Invites when debugging

I'm developing a Facebook application and currently testing out the invite feature. There is a limit on the number of invites that a user can send out using an application, defined by Facebook. However, I need to test the invite function's callback processing, so I sent out 5 or 6 invites to my test FB accounts, and now it says I can't send any more invites for the day. I'm using <fb:request-form> and I need to debug the script to which this tag posts to. So how do I override this invite limit?
Have you tried contacting Facebook? Perhaps they will be willing to relax the restriction for your testing or may have an alternative testing environment without this restriction. You are not going to be able to bypass their server restrictions unless you use multiple accounts, which I would not recommend as you may trigger security measures they may have in place.
I think I found the answer. According to this post: http://www.facebook.com/topic.php?uid=2318966938&topic=4554 FB calculates the acceptance rates of your invites and decides how many invites an app can send out. So in the test account to which I sent the invites, I accept all the invites from my application. And now FB allows me to send more invites from my app.