mediapop / django-friendface

Getting Facebook to work for Django.
2 stars 0 forks source link

Facebook application id should be uid. #36

Open kitsunde opened 11 years ago

kitsunde commented 11 years ago

Because cannot have compound primary keys in Django (yet) FacebookUser uses id for it's primary key and a unique constraint on (uid, application) . We should normalize on uid for all facebook ids.

yarbelk commented 11 years ago

is uid universlly unique or just unique to application? if it is universally unique (which as near as I can tell it is as facebook says it is indexable), then are we saying there can be several FacebookUsers for each Application/facebook user pair? this makes no sense to me yet. if we want to normalize on UID, we just set uid to primary_key=True comments?

kitsunde commented 11 years ago

It's universally unique. Facebook doesn't let applications share details on the user, because if a user opts into application A that asks for all kinds of permission application B that hasn't asked the user for this information shouldn't have access to it. Also the API returns different things depending on the source of the request, for example if we email a user with a facebook proxy email it'll say the application name, so we can't just overwrite this value.