0

I have an app that lets users search for items other users have put up for sale. I would like to be email to the owner/seller from the buyer using Facebook IDs. I'm using Android and the Facebook Graph API for my app. I have managed to get a user's email address after login (permissions etc all fine). Is it possible to then email another person using my app using their user ID from FB to get their email address?

So just to clarify - is there anyway to email a user ID that has given my application permission to get email address, if the logged in user ID/session isn't the one being emailed? Can I get a user's email address dynamically based on the User ID?

I realise it is unlikely and I'm most likely going to have to make some sort of Users table (I'm using Azure for a small DB) which stores an email address with the Facebook User ID, just wanted to check for sure though.

adrian
  • 2,786
  • 2
  • 18
  • 33

2 Answers2

0

There is only one possibility: https://www.facebook.com/help/224049364288051

People have to activate this one to make it work though, but you would need the username of the receiver. You can´t even get the username (or "real" ID) of the authorized user anymore, see changelog about "App Scoped IDs": https://developers.facebook.com/docs/apps/changelog

Another reason why this is pointless: With /me/friends, you only get the users who authorized your App, and not ALL friends of the user. So you can just store the email of every user right when he authorizes your App.

Btw, scraping is illegal on Facebook, don´t do that: https://www.facebook.com/apps/site_scraping_tos_terms.php

andyrandy
  • 72,880
  • 8
  • 113
  • 130
-2

Yeah completely correct. The point with the new API rollout makes the biggest advantage of finding friends meaning less. You can however, send email to the user since you have his email address.

EDIT 1 : I looked more into this and here is something you can do. if you have too much time on hand. Go to the users feed. Find all his posts with comments or Likes. Collect all the uids. At this point u have a bunch of user ids. Now write a script to go to fb.com/uid which will redirect to the users profile. Take the location and fb.com/username is returned. Use that to send an email to username@facebook.com

Suraj
  • 21
  • 2