-2

I am pretty new to facebook development and am trying to accomplish the following requirement for a banking site.

  1. I need to get the list of facebook friends of a logged in user and display the same in a drop down box
  2. User will select one friend and transfer funds to the same
  3. I need to send an email/SMS/private FB message to the selected friend with some details.

I can used the taggable_friends node to get all the friends list and show them in a drop down. Is there any way to accomplish the third point? As far as I have seen, I need the unencrypted facebook id to accomplish this which is not available in any of the graph API nodes.

Can someone please help if this is possible.

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85

2 Answers2

2

taggable_friends is for tagging only, you are not allowed to use it for anything else. More information about the possibilities for getting access to user friends: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

About part 3: You can´t send a FB message with the API, the Chat API is deprecated. You can use the Send Dialog though: https://developers.facebook.com/docs/sharing/reference/send-dialog

If you just want to send an E-Mail, just use PHPMailer: https://github.com/PHPMailer/PHPMailer

For SMS, there are plenty of services, usually with a limited amount of free SMS.

Keep in mind that you can´t get email or phone from a friend with the Facebook API at all. That was never possible and friend permissions are deprecated. The user needs to enter the E-Mail, phone number or Facebook Account (if you use the Send Dialog).

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • You were a few seconds faster :-) it was never possible to get the phone number and the email address of friends... – Tobi Mar 27 '15 at 11:33
0

The use of taggable_friends is a misuse in this case IMHO. You should use /me/friends, which only return the friends which also use the app. You cannot use the user-taggable-friend for anything else than displaying.

Furthermore, as the friends_* permissions have been deprecated, you can't receive the email or the phone number anymore. The latter was never possible anyway.

See the docs at

Tobi
  • 31,405
  • 8
  • 58
  • 90