Thank you! Your feedback has been delivered
Thank you! Your feedback has been sent

Code a django, javascript, facebook, Python Social Auth task

I want an "invite Facebook friends"functionality for a local social network platform, http://barr.io.

The site uses Python Social Auth. For Facebook sign-up, only email permission is taken. Thus when the user wants to invite their friends, they should be asked for extra permission to fetch their friends. If the user has already given permission by doing this before, the user list should be updated.

A similar example is the one in Duolingo.com (after you sign in, on the right column, there is a "find more friends on Facebook" button)

It would be nice to customise the invitation message and link, so that the users would not just invite them to the platform, but to their neighbourhood directly.

The Github repository is not public but I can let interested ones access the repo.

User Gravatar

omat

Posted Jul 7 2014 12:32 UTC

$50


  • Assigned To omab
  • Solved
  • javascript
    django
    facebook
  • 989 Views

4 Replies


Hi @omat, here's an example about how you can implement your requirements https://github.com/omab/psa-friendsinvite.

The key part is the custom backend at https://github.com/omab/psa-friendsinvite/blob/master/friends/friendsinvite/backend.py, it will check for a GET parameter (invite) and update the scope in that case, otherwise it will default to usual behavior.

The invite part of the project uses Facebook SDK since Facebook doesn't provide an API to send messages to users.

User Gravatar

omab

Posted Jul 9 2014 21:35 UTC

Solution

This didn't solve your task? Get your own custom solution.

Thank you @omab, I really appreciate the neat way you are presenting your solutions via Github.

User Gravatar

omat

Posted Jul 10 2014 4:11 UTC

@omab, there's a tiny issue that makes this example practically not suitable for the production environment.

i've opened a ticket for that:
https://github.com/omab/psa-friendsinvite/issues/1

i'd appreciate if you can have a look. thanks...

User Gravatar

omat

Posted Jul 15 2014 4:39 UTC

@omat, I've replied to your ticket and updated the example to show how that can be accomplished.

User Gravatar

omab

Posted Jul 15 2014 6:15 UTC

Add a reply

By posting a reply on CodersClan you agree to our Terms & Conditions