Friend Invite System for iPhone - ios

I am looking for information on how to implement a friend system within my iPhone app. The app is going to use a web server to check login's. So would the logical thing be to have the friend system setup through the web server as well? I am clueless on what I need to brush up on to be able to implement such a thing so any information/tutorials/open-source code/guides would be helpful to help me understand how it works. Thanks.

Ask new users about their email (login) and passwords. Also let users to invite to your app his/her friends via:
Direct input of known email address.
Selection friend from iOS addressbook (you will also need an email there).
Then just take care of maintaining lists of friends' emails on server side (or both server and client side).

Related

List of Authenticated Users

I am working on a tool inside of a current iOS app that I only want to be available to a handful of people. The company email addresses are all gmail.
How can I make the app work in a way that, You sign into your google account, and on the server end it will check if you have access or not. If you do, it will then move on to the tool page.
Does Google API have anything on this?
Thanks in advance
Google App Engine has the Users API which you can use to allow people to log in with a Google Account. You can the write server side code to cross check the logged in email address against your whitelist (which may or may not be configurable), and only allow access if the emails match.
Is that the kind of thing you mean?

Facebook SDK iOS invite user without FBWebDialogs

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.

Validating GamceCenter user credentials in the backend

I am building a backend for ios apps, that support login in different networks.
Once the user login in to the network the client tells the news to the backend, and this could offer a list of worlds that the user might play, or even delete old worlds.
One way to steal another person's world is by saying that you are his social network id.
To solve that with facebook, we force the client to send us the fb_token, a token provided from facebook to the client, that we use in the backend to ask facebook if that specific user is the one that he told us to be.
If apple doesn't provide a way to validate this I understand that if an iOS app wants to use game center, it is directly forcing the app developer to also use iCloud because apple can validate the user credentials.
Did apple provide any way to validate user credentials?
The client on iOS can retrieve info about the currently logged in player in GameCenter, which has nothing to do with iCloud.
If you want to use iCloud to authenticate, you might have a different player than the one you wanted.
I think the solution is for the client to retrieve the player info in GameCenter, and send it to your server in an encrypted fashion (say HTTPS), including a timestamp and possibly other dynamic information. This way you'll know that the user info is being sent from the client app itself and there is no man-in-the-middle. That's really the issue that you are struggling with: how to ensure that client-server communication is secure.

How can Twitter apps contact their users?

Given that Twitter doesn't provide users' email addresses to apps [1], how can a Twitter app contact its users?
One thing we've done is to have a corresponding Twitter account for our app, and whenever a new user signed up to our app through Twitter, we would follow them. But even so, we can't DM them from this account unless they follow us back. We can tweet "at" them (via mentions), but public tweets are out of the question for private notifications, and even if that weren't the case, users aren't notified of mentions unless they follow us, too.
Is there any other possible way then a Twitter app can contact its users?
[One possibility that would be great would be if apps could DM their users. This would still be independent of whether that app could access their users' DMs. That would let apps notify users (which is an important requirement for many apps), while still letting Twitter protect its users' email addresses.]
[1] https://dev.twitter.com/docs/faq#6718
The answer to this question is pretty simple: you can't.
Not entirely true, of course. There's #mentions, DMs and any notification feature your development platform offers, such as push notifications on smartphones. Then there's e-mails (just offer a newsletter to the user). But Twitter doesn't offer this to you, and probably won't.
You could make new users follow your apps account - then you would be able to DM them.
Making people automatically follow you probably breaches the Twitter T&Cs. So you would need to have this as an optional step.
User signs in to your app
You present a screen asking them to follow you - or a link if they don't want to
You can now DM them.

Is it possible for a Facebook page to access the ID's of every user who 'likes' that page using Facebook Connect for iOS?

I am making an app in Xcode which has users register via Facebook, their ID number is then stored in our database along with their device token so that we can send them push messages.
In order to have companies use the app, we would like them to be able to send messages to all registered users who also like their Facebook page. Obviously this means accessing a potentially huge list of IDs, but tbh I'm not sure this is even possible.
Presumably it's not done in the same way as accessing a profiles friends list as they are not friends (would they be fans? likes?). I can access a users friends list easily enough, but I would be appreciative if someone could point me in the right direction as to whether the same thing is possible for business pages.
Thank you.
Facebook doesn't allow access to userId's unless they specifically allow an app permission. This can be done via asking for any permission and a userId will be given.
In your other case you get around this because a user gives permission to access their friends list.

Resources