question

crisbartel avatar image
crisbartel asked

How I know the displayName from group inviter?

I want to create a group, so I send a request to a friend. But when my friend receive the request, the only info that I can acess is the PlayerTitleID, and I can't use GetProfile because I need to use PlayfabID instead PlayerTitleID. What should I do to know the display name of the guy who invited me to a group?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

Assuming there are 2 players A and B, then you can implement this way:

  1. Player A creates a group and invite Player B to the group using InviteToGroup API.
  2. Player B use the ListMembershipOpportunities API to see the invitations, the PlayFabId of Player A can be obtained in the Invitations[0].InvitedByEntity.Lineage.master_player_account.Id
  3. Player B can then use the GetProfile API with that ID to get the display name of Player A.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

crisbartel avatar image crisbartel commented ·

Just one observation, "Lineage" is a dictionary so I can't do this:

"Invitations[0].InvitedByEntity.Lineage.master_player_account.Id"

but I can do this:

"Invitations[0].InvitedByEntity.Lineage["master_player_account"].Id"

And now it works nice! Thanks!

1 Like 1 ·
meibyhernandez avatar image meibyhernandez commented ·

Hello, there is something worong with the mentioned API? Im calling the ListMembershipOpporunites but it returns empty.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.