0

I'm writing a social app in Django where all users sign up through Facebook using Python Social Auth. All content that a user sees will be content created by her Facebook friends. Initially, I planned on creating individual users with no database relationship to each other, and relying on requests to Facebook to determine what content to display for each user. Now I'm concerned that this might be a bad idea.

Here's what I've considered:

Advantages

  • Less database management
  • Don't have to worry about updating friends when two users become friends or cease to be friends

Disadvantages

  • Requires many requests to Facebook which could be a performance issue
  • Seems like it could run into scaling issues

Is this a bad idea? Should I be storing these friendships in my own database and referencing them there?

asked Jun 16, 2016 at 8:36
1
  • 1
    don't forget the ultimate kicker for your app - there are a lot of people who don't use Facebook, or do not trust Facebook to manage non-FB sites. I wouldn't use your app at all if the only login option was FB. Commented Jun 16, 2016 at 9:38

1 Answer 1

1

Caching the user/relationship data locally will certainly make your application much faster because your backend doesn't need to perform as many time-consuming queries on the facebook API on every single request.

Also keep in mind this clause from the Facebook API service terms:

11.If you exceed 5M MAU, 100M API calls per day, or 50M impressions per day, you may be subject to additional terms.

That means that when you have more than 100 million API calls per day, they might send you a bill of undetermined size and threaten to cancel your API access when you don't pay up. We don't know anything about the scale of your operation, but when you avoid doing multiple API calls on every single page request you can considerably increase the scale on which that restriction becomes a problem.

answered Jun 16, 2016 at 9:17
3
  • 100m calls.... Kind of sounds like a lot, but at the same time, it does seem very possible to get past that. What exactly do they determine as a "Impression" and wtf is a "MAU?" Commented Jun 16, 2016 at 13:42
  • 1
    @Lasagna MAU = Monthly Active Users. The impression count is relevant for facebook apps which are embedded within facebook. Commented Jun 16, 2016 at 13:46
  • Thanks for that, had to look up what an impression was, so that was my bad. 50m seems like a lot of impressions, I would think API calls would be the biggest worry. Commented Jun 16, 2016 at 13:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.