get user photos by email address using Facebook-api - facebook-graph-api

i am working on a new project, and i want to get all user photos in facebook by providing an email address using the facebook graph-api.
I tried to search for some information for how to do it, but with no luck.
Is it possible to implement this?

You can only get photos of a user by authorizing the user with the user_photos permission. After that, use the /me/photos endpoint. There is no way to get photos (or any data) by email.

Related

Using facebook graph api to read photo tags

I am building a website using React and Redux to search facebook photos through tags like my Friends name or by location. User needs to login with facebook so that the application can read its pictures. A user simply puts in the search filters like Tagged users or the location of the picture and my app will show results based on the filters. This will help to find old photos with friends which sometimes get lost on social media due to a large number of photos present(Uploaded or Tagged)
I am trying to fetch mutual photos of me and my friends using my access token and trying to read the tags present in the photos through API but the Response contains only my name in the tags and not other people who are tagged in that photo.
Is there any way to fetch the users who are tagged on a photo uploaded? Any help is appreciated.
Graph api link
Access to any data involving your friends is only possible if those friends specifically authorized your App too. You cannot even get an ID of a friend if he did not authorize your App.
Yes, in order to access involving your friend to authorize your app. But from the details i can see that,
"A user access token may read a photo that the current user is tagged in if they have granted the user_photos or user_posts permission. However, in some cases the photo's owner's privacy settings may not allow your application to access it."
Note: Just need to verify users privacy setting once again.

Accessing user_ID via messenger bot

I'm using the Graph API, but I can't figure out how to get a logged-in users ID address.
The intro to Graph states "The Graph API can provide access to all of the basic account registration data you would typically request in a sign-up form for your site, including name, email address, profile picture, and birthday" but to access them i need user_ID so how could i get it ?
https://developers.facebook.com/tools/explorer/?method=GET&path=me%3Ffields%3Did%2Cname&version=v3.0
You need to have a token from the user, check out the given link. You can see what informations you can access if you give permission to your own profile.
This ID is unique to each app and cannot be used across different apps.

Security issues , Making social media profile pictures secure

In Facebook API, when we fetch user information we can get profile picture.
The URL is like this:
https://graph.facebook.com/{some_app_user_fb_id}/....
Using this URL, anyone can get the facebook id of the user and can get the facebook account of the user.
My question : Is there any way to make the profile picture URL secure in facebook API or something where no one can make out the original account of the facebook without uploading the profile picture to some other place ?
Similarly I want to ask about google plus profile picture.
The URL is something like this:
https://lh3.googleusercontent.com/{some id}/{something here}/{something}/{somethingelse}/s11-c/photo.jpg
Google picture seems to be more secure, and I don't think anyone can access the main google plus account or gmail email using this picture URL.
2nd Question: So is google plus profile secure ?

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

Is it possible to display Facebook user photos if someone isn't logged into Facebook?

I'm in the draft stage of designing a charity site for a friend of mine, and we'd like to be able to display photos of people who donate (they would have the choice of turning their photo on or off).
I'm used to logging people into another app of mine via Facebook, and retrieving their basic data.
What I'm wondering is - since the person viewing the site would be the only one logged into it, is it even possible to display photos of Facebook users who have donated ie can you retrieve a FB user photo if they aren't logged in?
If not, are you allowed, with the user's permission, to store their Facebook photo?
Thanks for your time and help.
Have a look at
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/picture/
It's stating
Because profile pictures are always public on Facebook, this call does not require any access token.
This means as long as you requested the public_profile permission upon Facebook Login, and stored the app-scoped user_id in your database somewhere, you can use this app-scoped user_id to generate the profile picture image sources as follows:
<img src="https://graph.facebook.com/{app_scoped_user_id}/picture?type=large&redirect=true"/>
and replace {app_scoped_user_id} by the real app-scoped user_ids in some kind of loop.