I've been searching this question, and I haven't been able to find anything that works. I have an iPhone app that allows users to link their Facebook account. It would look something like this:
Once a user has successfully linked to FB, I want to present them with a list of their FB friends and an option to invite selected friends.
FB Friend 1........... Invite
FB Friend 2........... Invite
...
FB Friend 1000..... Invite
Basically, I want to send a message to FB friends that says something like "Check out this app". I'm pretty sure this has to go to either their notifications or wall and cannot go as a FB message, but I can't figure out how to do it.
Also, I don't need to select a group of friends to invite -- this can be done one at a time. So it would look like this:
FB Friend 1........... invited
FB Friend 2........... Invite
...
FB Friend 1000..... Invite
Thanks so much for any help you can provide.
Unfortunately there isn't anything in the iOS SDK that presents the apprequests dialog, and a user has to have installed/approved your application before you can send them application notifications via a POST request...
Requests are a great way to enable users to invite their friends,
accept a gift or help them complete a mission in your app. There are
now two types of requests that can be sent from an app:
User-generated requests: These requests are confirmed by a user’s
explicit action on a request dialog. These requests update the
bookmark count for the recipient. You send requests by using the
recently launched Request Dialog.
App-generated requests: These
requests can be initiated and sent only to users who have authorized
your app. Developers can send these requests using the Graph API. Use
these requests to update the bookmark count to encourage a user to
re-engage in the app (e.g., your friend finished her move in a game
and it’s now your turn).
The only way to get this is via Facebook's Requests 2.0 dialog (which is not currently available to the Facebook iOS SDK):
http://developers.facebook.com/blog/post/453
See more here in this related question...
Sending application requests that appear in the left column on Facebook home page?
Related
For a user to be able to message an open-graph story via the new Facebook Messenger functionality (messaging an open graph message), does the user need to be logged in to Facebook in my app?
I am talking about the new functionality presented by Facebook at their f8 conference (sending an open graph story to friends through Facebook Messenger).
I'm pretty sure I have everything set up correctly in my mobile app. But the problem is that the other testers (people registered as testers in my app on Facebook) are receiving the open graph story correctly, but when tapping on the open graph story, even though Facebook Messenger redirects to the right app (my app), the FBAppCall object doesn't contain any targetURL information, there is no &target_url=.... ...even though my open graph object has a proper URL set.
That is why I am thinking: Does the user need to also POST the open-graph the story somewhere (thus the user needs to be logged in with Facebook), in order for Facebook Messenger to be able to get the object's URL later?
It seems like this shouldn't be the case, as opening this new functionality of sharing through messenger should be just about getting rid that friction when sharing a story.
does the user need to be logged in to Facebook?
No, he doesn't.
does the user need to be logged in to Facebook in my app?
You must have a valid client token, which means your user must have authorized your app. Just once. Then he can log out from Facebook and/or your app, and you can keep the token on your database and make as many requests as you want, regardless of the user being logged in anywhere.
That means: After the user logs out from facebook, you still get to keep the client token for as long as you want (Well, they do expire: take a look at https://developers.facebook.com/docs/facebook-login/access-tokens/ for more info), and use it to make requests on behalf of the user as you please, using any of the permissions your app was granted by the user (read messages, send messages, post on my behalf, etc.).
In order to share an open graph story through facebook messenger, there must be a story to share published somewhere, of course.
Take on account privacy settings may prevent user/app A from seeing a user/app B story shared by someone else (user/app C) if user/app A didn't have permission to see the original post in the first place (happens when posting with 'only to friends' privacy setting, for example)
The best you can do: debug the responses your app is getting from Facebook. Every time something unusual occurs Facebook will notify you. Are you sure you are not getting any errors/warning messages?
I am creating an app that is connected to Facebook.
One functionality of this app is to send notifications to Facebook friends (they will able to see using any browser when they log in to Facebook, or in Facebook app) to try and download the app.
I was able to create a table list of Facebook friends who don't have the app. And in each UITableViewCell, I added a UIButton titled "Invite" that will call an function to invite that particular friend in the cell.
I want that when the user tapped the button, the Facebook SDK will send a notification to that Facebook friend.
I don't want to use the default app request dialog the Facebook SDK has. I want to customise my own.
Is it possible?
It is not possible what you are looking for.. See my below answer which would clarify you..
There is option of frictionless requests.
On Facebook developer site they mentioned in section of Invites and Requests
We touched on a scenario where users exchange requests back and forth. If this scenario is typical in your game, it can be a bad user experience to force them through the request dialog every time they want to send a request. The solution for this is frictionless requests.
Frictionless requests let users send requests to friends from an app without having to click on a pop-up confirmation dialog. When sending a request to a friend, a user can authorize the app to send subsequent requests to the same friend without another dialog. This streamlines the process of sharing with friends.
For more reference see Facebook Invites and Requests
Facebook has an example of adding a gifting loop to an app here: https://developers.facebook.com/docs/games/requests/
See "Gifting and Social Trading"
My question is how to check for incoming gift requests so that they can be displayed. All of the examples I have found require that you click on the incoming message within facebook in order to get the request into your app. But that's clearly not what they are demonstrating here.
How do I check for the incoming requests so that I can display them in an inbox without going through the facebook app?
I am guessing that the user in this example did not have to click on each request in the facebook app to get them to show up in their inbox.
The requests a user has received from your app you can be queried via /me/apprequests
https://developers.facebook.com/docs/graph-api/reference/user/apprequests/
I want to get list of my friends from Facebook who are not users of my app, and be able to invite them.
Using FBWebDialogs I can pick users, but I'm wondering how foursquare did it?
Screenshot:
There is option of frictionless requests.
On Facebook developer site they mentioned in section of Invites and Requests
We touched on a scenario where users exchange requests back and forth. If this scenario is typical in your game, it can be a bad user experience to force them through the request dialog every time they want to send a request. The solution for this is frictionless requests.
Frictionless requests let users send requests to friends from an app without having to click on a pop-up confirmation dialog. When sending a request to a friend, a user can authorize the app to send subsequent requests to the same friend without another dialog. This streamlines the process of sharing with friends.
For more reference see Facebook Invites and Requests
You are asking two questions here:
How to invite Facebook friends without web dialogs?
Unfortunately, the web dialogs you are referring to are the best way to send invites to friends. There was a time when we had to resort to ugly hacks just to get this functionality in applications. Facebook added this functionality to iOS SDK after developers created bug reports and were literally behind them.
Get a list of friends who are not using the app and invite them
Foursquare IMO is not using the requests API. What they do is, whenever somebody links their Facebook account to their Foursquare account they make a note of the users friends who are using/not using the app. This is possible if the user grants the app permissions.
Then in the invite screen, they simply build a UITableView with list of friends who they think are not using the app. When you tap Invite they will just send an email invitation and not the Facebook request you are referring to.
I think FourSquare syncing the user's friend list(friend ids) to its own server.. Then after they are checking it to create the custom interface like the screen shot you shared.
Maybe I didn't get the question right, but from what I know after you tap the invite button on Foursquare the Facebook invite dialog (apprequest) will pop up.
In general this dialog will let you select friends if you didn't specify any friends ids before presenting it, or show you the selected friends like in Foursquare example.
There is an API to get your FB friends, so it's possible for your server to check witch of then already has the app...
I've been researching this for a while and the main solution I have found is frictionless requests, as Rahul Patel noted. You can do a direct request to the graph API and see who has your app installed.
From there you could fairly easily implement any sort of filtering. For example, using the Friend Picker UI Control and implementing the method friendPickerViewController:shouldIncludeUser: and checking against a list of facebook ids who are not on the app that you cache somewhere else in your application and actively update it (for example in a simple core data model that is updated when appDidFinishLaunching), returning no if the user is not displayed. This would only allow users to select individuals who are not on the app, and then you could send a request to them under the hood with frictionless requests.
I do think that it is not a great idea to spam people, however, without at least allowing them to check the names of their friends, or see who they are.
I've read over some of the developer material and have not seen a way to have an application send facebook users personalized wall posts. For example, FB users who likes "Mustangs" could receive a post from my application when there is news specifcally about Mustangs. However, FB users who didn't select Mustangs would not receive the post. Is there a way to do this on the FB platform for applications?
FYI - The only success I have had is sending a post to a user which appears to have been sent from the user as if the user is posting to themselves. Only upon close inspection can one find the text "via application xyz" next to the post time.
Thanks for taking the time to read and respond.
Yes, you can do this with any of the frameworks. See https://developers.facebook.com/docs/sdks/ Also study up on the Graph API (pay attention to the from attribute of a feed item, testing it out using the graph API Exporer: https://developers.facebook.com/tools/explorer