Using photon plugin and facebook sdk together

I am creating a multiplayer card game using unity photon plugin.
untill now everything works fine.

now i want to integrate facility of inviting facebook friends to join room.
for which i need to send message to that online photon player.

all i have is a facebook id, is there any way if i can send request to online facebook friends

thanks

Comments

  • FB should have a method to message friends. You only need to send some unique room name to the friend as invitation. Both players can then try to JoinOrCreateRoom() and meet in the same room (by name).
  • there is a way in facebook sdk but that will notify to facebook App.
    i want to receive it in game. i can retrieve facebook id of friends and that id is also stored in player property.. can anything be done by this????
  • In PUN, you can't message users by name. You could use Photon Chat for that, if your friend is online, too. Aside from that, you can only message users in the same room as you are in Photon.

    You can use FindFriends() to find the games that your friends are playing currently (if any).
  • FindFriends() - which friends that will message? and can by using PUN can i send message to the player who is joined in another room?
  • It will find the friends you tell it to find:
    http://doc-api.exitgames.com/en/pun/cur ... 7b8786b734

    You can not message friends. You can only find where they are (in which room) to join them.
    If you need to message friends independent of rooms, you should take a look at Photon Chat. The API is included in PUN but you need to setup another app in our Dashboard and it's another subscription. However, it's room-independent and as long as your friends are online, you can message them privately or do a guild chat and so on.
  • If I understand correctly, in order to implement challenging/inviting facebook friends, both friends have to connect using their facebook accounts, and also you have to make them photon-chat friends (via ChatClient.AddFriends), before they can even search for each other to get their status?
  • To search friends, FindFriends() is enough.
    To exchange with messages, chat api required.
  • Hi Vadim,
    How do I use FindFriends with my friends' facebook IDs? It only seems to work with the name I provide in the Connect() call, not the auth values.
  • Probably the simplest way to do so is using fb ID as name in connect() (or as part of this name).