-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook: infer app-scoped user ids like we infer usernames #651
Conversation
When other applications posse to Facebook, they generally create URLs with user-ids scoped to *that* application. These URLs make no sense to Bridgy. This change canonicalizes them to Bridgy's user ID for that user, just like we do for usernames. ref snarfed#375, snarfed#650
Full disclosure: I don't have an easy way to test this live and haven't yet... |
@@ -91,6 +89,9 @@ class FacebookPage(models.Source): | |||
username = ndb.StringProperty() | |||
# inferred from syndication URLs if username isn't available | |||
inferred_username = ndb.StringProperty() | |||
# inferred application-specific user IDs (from other applications) | |||
inferred_app_scoped_user_ids = ndb.StringProperty(repeated=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: consider just inferred_user_ids
and similarly elsewhere? technically this happily infers global user ids as well as app scoped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, that's a really good point, like if bridgy has an app-scoped ID and the POSSE application has a global ID.
looks great, thanks again! feel free to merge whenever. oh and i regularly make changes like this without testing manually. :P not a great habit; unit tests maybe give us a bit too much confidence. ¯_(ツ)_/¯ |
oh btw i've turned off the coveralls comments. 🃏 🔫 |
Oh great! I did actually just figure out how to test locally, and it looks like it works
|
good timing too, #650 inspired me to put "remove see original OPD" on my todo list this morning. :P |
When other applications posse to Facebook, they generally create
URLs with user-ids scoped to that application. These URLs make
no sense to Bridgy. This change canonicalizes them to Bridgy's user
ID for that user, just like we do for usernames.
Open question: does this cause problems if you POSSE to multiple
Facebook accounts (e.g. kyle.mahan and indiewebcamp). Bridgy will
be overly generous in classifying syndication links to one as syndication
links to both, but since the post ID part of the URL will always be unique,
I don't think this will cause any actual harm.
ref #375, #650