mediapop / django-friendface

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

FacebookInvitationMixin and Like gate #75

Open gaqzi opened 11 years ago

gaqzi commented 11 years ago

I'm curious what we should do if we want to track invitations and if the user got an invitation then auth him and then register the acceptance of invitation and finally show the LIke gate.

With the current flow for accepting the invitation this is what happens:

1) Un-authed user with invitation request 2) Sees request ids but no authed user, return super(...) 3) FacebookAppAuthMixin sees the super and that there's no authed user, so it creates an auth and redirects the user to Facebook. 4) User gets back from Facebok and gets redirected back to invitation request which accepts it and redirect(invitation.next) or return super(...). 5) The like gate if 4 returned super. (or redirects to /details/ which shows the Like gate, the end result is the same)

If the user is not authed and no request id then the user gets authenticated and then like gated. The user never gets a chance of seeing what it's all about. Just that they need to accept the liking. If this is done at the base application.facebook.com url they don't even have a Like button unless we've added one in ourselves.

Should we ignore the authentication part completely? Should we maybe create a standard like gate that incorporates the custom like button if the request is not contained inside of a page? (if we even can track that). (Which also would make the like gate mobile enabled.)

The only way around it authentication wise that I can come up with is adding the auth functionality from FacebookAppAuthMixin and only calling it if we need auth to verify the user.

Any thoughts?

kitsunde commented 11 years ago

The LikeGateMixin expects auth before LikeGateMixin if you specify target. It just defaults to only work on facebook pages.

kitsunde commented 11 years ago

I suppose you could make it so if a user is not authed, it'll not show a facebook gate except if it's on a page. That's how photo comps work. We'd need to add a setting for that.