question

orhanozsoy avatar image
orhanozsoy asked

How to add friends other players, Push notifications or with title data?

Hi,

I want make a system for players add friend others.How can i make localization for that process?Should i use push notifications templates with different languages or should i take receiver player's title data and this player's language. then localize script and push notification with this localized sentence.Which is it you suggest?

14 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.

Seth Du avatar image Seth Du ♦ commented ·

Sorry, can you describe your requirement more specifically? The title data is shared within the title, do you mean Player Data?

Currently PlayFab build-in friend system is one-way adding which means the the confirmation from target player is not required. You can craft your own friend adding system, please refer to: https://community.playfab.com/questions/8037/friend-system-clarifications.html.

If you have more detailed needs, please tell us.

0 Likes 0 ·
orhanozsoy avatar image orhanozsoy commented ·

Sorry about that. Yes, I meant player data I think i can add friend with push notifications.I send a notification to other player and when other player receives this notification and accept it triggers call requestfriendlist apicall.But I don't know how is be a localize notification. I want to send notifucation as receiver player's language.My issue is localization for this process.push notification templates or I can get other player's data before execute cloud script and localize add friend sentence.Then push notification to other players wlth this sentence.This was my question sorry about my explanation.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ orhanozsoy commented ·

First of all, you may notice the language configuration in player account information page. It is English by default, which means English verison of email template and push notification template will be sent. You can find the templates settings at [Game Manager]->[Content]->[Push Notification Template]

For now, there is no API that can retrieve player's language or send push notification via Push Notification Template, you can still use some work around solutions.

Since the multi-language need can be fulfilled, the question is how to send push notification via template to the target player when we add friends. Assume you are Player A and wants to add Player B. You may implement functions in Cloud Script which will first add target player (B) as a friend for A. then call WritePlayerEvent for Player B so that in the PlayStream Monitor, a custom event that generated by B will show, such as "Been_added_as_friend_event". Then you config a Rules at [Game Manager] ->[Automation]->[Rules], which will be triggered by the custom event and additionally, the rule will then send the push notification template.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Seth Du ♦ commented ·

I am not sure if there is thread about sending push notification via template in the Feature Requests Forum. You are free to post or vote an existing one and more votes can help with the priority.

0 Likes 0 ·
Show more comments

0 Answers

·

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.