开发者

How to architect and design Facebook friends integration into a iPhone app with cloud service

For some reason I can't find this information anywhere. I'm looking to figure out best practices for how to design and architect Facebook integration into an iPhone app that also has a cloud service backing it for my own (non-facebook) data.

Specifically, assume a user is going to authorize Facebook access in my iPhone app and I want to find "your Facebook friends that are also using this app+service".

The Facebook authentication and authorization with iOS SDK is straightforward, and it looks obvious that my service needs to store the user's Facebook User ID. However, I am trying to get clarity on:

  1. Who does the friend lookup against Facebook's server? iPhone client or my service?
  2. Does my service cache anything about the relationship between the friends or is it looked up each time?

I'm ultimately trying to figure out how to get a design that will scale to millions of users and see problems in whether client or the server does the work. If it's the cli开发者_JS百科ent, then user has to wait for a call to FB OpenGraph, then back to my cloud service to get the intersection of FB friends using my service (+ any other metadata I want to show).

If it's my server, I'm caching information that ultimately has to be sync'd and reconciled with changes to the user's friends list. Also, this doesn't really solve the scale problem since the iPhone app would sign into FB for a given user, send me their Facebook ID, then my service would have to call Facebook OpenGraph server-to-server and still reconcile the FB friends list.

Would love any advice!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜