Hey, I am using Pun for my multiplayer shooting game in which only two players can join the and it works perfectly. Now I want to implement facebook Login system in photon and allow the player to invite his facebook friends to his game. in my research i found this link. https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/pun-and-facebook-custom-authentication and implmented which works fine. Now I want to invite friends to my game but cant find anything related to this. You have mentioned a link in most of the topics which is broke or been removed. http://doc.exitgames.com/en/pun/current/tutorials/pun-and-facebook-custom-authentication
in other tutorials/discussions you've mentioned the code to get friend list.
void OnEnable(){
StartCoroutine("UpdateFriendsOnServer");
}
void OnDisable(){
StopCoroutine("UpdateFriendsOnServer");
}
IEnumerator UpdateFriendsOnServer()
{
while (true) {
if (_friendList != null)
{
string[] friends = _friendList.ToArray ();
PhotonNetwork.FindFriends (friends);
}
yield return new WaitForSeconds(friendsCheckPeriod);
}
}
override void OnUpdatedFriendList () {
Debug.Log ("OnUpdatedFriendList");
if (PhotonNetwork.Friends != null)
{
foreach(FriendInfo friend in PhotonNetwork.Friends)
{
Debug.Log ("Friend name: " + friend.Name + " Online: " + friend.IsOnline);
}
}
}
I just don't understand that how will i get and initialize the _friendList list.
please help me solve my problem.
in other tutorials/discussions you've mentioned the code to get friend list.
void OnEnable(){
StartCoroutine("UpdateFriendsOnServer");
}
void OnDisable(){
StopCoroutine("UpdateFriendsOnServer");
}
IEnumerator UpdateFriendsOnServer()
{
while (true) {
if (_friendList != null)
{
string[] friends = _friendList.ToArray ();
PhotonNetwork.FindFriends (friends);
}
yield return new WaitForSeconds(friendsCheckPeriod);
}
}
override void OnUpdatedFriendList () {
Debug.Log ("OnUpdatedFriendList");
if (PhotonNetwork.Friends != null)
{
foreach(FriendInfo friend in PhotonNetwork.Friends)
{
Debug.Log ("Friend name: " + friend.Name + " Online: " + friend.IsOnline);
}
}
}
I just don't understand that how will i get and initialize the _friendList list.
please help me solve my problem.