Django all auth microsoft graph profile picture - django

I use django-allauth about user registration/login using user's Microsoft Graph profile. Now, I can take some standard information from Microsoft (default for all auth). Is possible to retrieve also list of profile-pictures? How can make it in allAuth?

To retrieve the profile photo of a user:
GET /me/photo/$value
GET /users/{id | userPrincipalName}/photo/$value
AFAIK not sure we can fetch the list of profile photos, for more information please refer to this document:https://learn.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0#to-retrieve-the-profile-photo-of-a-user
Hope this helps.

Related

Django Azure AD get user info

I am currently using django-azure-ad-auth package for user authentication purpose. I wanted to retrieve user information too like displayName etc, How do I go about implementing this?
You are using django-azure-ad-auth package which helps only for authentication purposes. You need to use API's likes MS Graph for getting the user information.
To use MS Graph with Python please follow MS document

How to fetch a list of Facebook groups that a user administers after new API changes?

Our app has been approved for Groups API as well as publish_to_groups API.
Earlier, Facebook let you get groups that a given user administered. However, administer field is deprecated in the latest API.
How can we fetch it now?
I finally found how to do it. Earlier, Facebook allowed you to pass a filter with ?administrator=1 GET parameter. However, they still have an undocumented field administrator that you can fetch via ?field=administrator GET parameter. It will let you know if you are an admin or not and you can use it from there.

Django-Allauth and django-facebook to retrieve Facebook profile images

I integrated django-rest-auth and django-allauth for user registration/login using Facebook.
Now, I can authenticate (and I can create) the Facebook user and I can retrieve some basic informations like e-mail, first name, last name...
Now I need also to retrieve some profile images (last 3 user profile images) about the user at registration of it in my platform.
I'm confused because I can't use allauth to take also these informations from Facebook so, probably, I need to take it directly using Facebook GraphAPI (is correct this my solution?)
Is a good solution the integration of django_facebook?
The photo can be retrieved directly with the user UID and this URL:
http://graph.facebook.com/UID/picture?width=40&height=40
In function:
fb_uid = SocialAccount.objects.filter(user_id=self.user.id, provider='facebook')
if len(fb_uid):
return "http://graph.facebook.com/{}/picture?width=40&height=40".format(fb_uid[0].uid)
I'm not entire sure, but I think you will get access to the user's photos when you add "user_photos" to scope list in facebook configuration. Did you try it?
Here is a link to django allauth documentation: http://django-allauth.readthedocs.org/en/latest/providers.html#facebook

Linking different user profiles in Google app Engine using python

I am building a social app on Google app engine using python, for which i am using Google+ api for user login and after login user can post and share.I need help in connecting one user profile to another so that user can see others post and follow them and also in displaying one's profile to another user. Like a user can browse public posts of all users, and if he clicks on creator of post, the link should open creator's profile with option of following him.I know to save user data in datastore and retrieve them.
Thanks.
You will probably want to use the Google+ Sign-In, which can get you some information to the social graph and then access to the Google+ API. This information includes the ID of people in the user's circles that they've permitted you to see, so you can use this information to build their social graph.
If you have more specific questions, you should probably update your question (or post a new one) that demonstrates the exact problems you're having with the code.

How to get Google Profile Information of a User in Django?

Is it possible to get a User's Information from Google Profile using Django?
For example, i have an application which does user profiling and the user wants to update the information by his/her google profile.
I guess you should look here http://code.google.com/intl/pl-PL/apis/gdata/articles/python_client_lib.html since gdata provides access to all data stored in Google