0

I am developing an interactive website, where there is a list of users and a list of user's friends (by my website's usernames). I would like to add the possibility to connect a user to his account on facebook, in order to add the features:

  • a user, after indicating his facebook login credentials, should have the option to see who are his facebook friends registered is this website, and then send a chat message to someone of them with a content such as "I'm at website.com right now, join me here!".

  • a user should have the option to see his full contact list and then send a message (for instance a poke, an email, or other type of message... - not to the timeline!) to a subgroup inviting them to like/visit the external page;

I am more interested in the 1st option, but from what I have been reading, the facebook chat API is going to be removed by 30th april 2015 [ ref. https://developers.facebook.com/docs/chat ], with no perspectives of being replaced. Therefore I don't see other ways to implement my 1st option - is there some other way?

In respect to the 2nd option, by consulting facebook's pages [ such as: https://developers.facebook.com/docs/graph-api/reference/v2.3/friendlist, https://developers.facebook.com/docs/facebook-login/access-tokens ], I see that it is possible to get a friend list with that graph-api if I use a complicated access token. If I try to go that way, would it be possible to get the e-mails or other forms of contact after receiving those friend lists?

I would like to receive suggestions on how to implement the 1st/2nd, or both options. What are your suggestions regarding this subject?

Thank you.

(PS. different languages are welcome, although I prefer to work with php and javascript).

sissi_luaty
  • 2,839
  • 21
  • 28

1 Answers1

2

The Chat API is deprecated and will stop working even for old Apps after April 2015. There will be no replacement. How to invite users to an App or Website is explained here: https://developers.facebook.com/docs/apps/faq#invite_to_app

the friendlist endpoint is actually not for getting access to the friends, but only to the...well, friendlists ;) - /me/friends would be the correct endpoint, but you will only get friends who authorized your App. You can read more about that in this thread: Get ALL User Friends Using Facebook Graph API - Android

Btw, prefilling messages is not allowed anyway, even if the Chat API would still exist you would need to let the user write the invite message. So you can just use the Send/Message Dialogs. You don´t even need to authorize the user for that.

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130