Documentation

Did you find this helpful?

Title News

Title News is a mechanism for communicating with your players. It contains a few basic elements: Title, Date, Status, and Body. The body is a string, and can contain raw text or json.

Create Title News

There are two ways to create Title News entries, via Game Manager and the admin API method AddNews.

To create Title News entries with Game Manager, you will need to be familair with Game Manager.

Game Manager: Navigate to your title -> Content -> Title News -> New Title News

click "Save Title News" and your entry will be created. The date will be set to when you clicked the "Save Title News" button.

Alternately, you can create Title News by calling AddNews. Using the admin API allows you to specify a custom timestamp. News added this way is immediately published. Here's a code example:

void CreateNews() {
    PlayFabAdminAPI.AddNews(new AddNewsRequest {
        Timestamp = new DateTime(2014, 1, 8, 12, 0, 0), // Any date - This one is the founding of PlayFab
        Title = "My Second News",
        Body = "This is my second news post."
    }, 
    result => Debug.Log("News post added!"),
    error => Debug.LogError(error.GenerateErrorReport()));
}

Read Title News

Reading the Title News is very simple. The GetTitleNews methods return all published Title News entries. Archived and Unpublished entries will not be returned.

void ReadTitleNews() {
    PlayFabClientAPI.GetTitleNews(new GetTitleNewsRequest(), result => {
        Debug.Log("Got latest news!");
        // Process news using result.News
    }, error => Debug.LogError(error.GenerateErrorReport()));
}

Update Title News

The content of a Title News entry can only be modified in Game Manager. Find the entry you wish to modify:

Game Manager: Navigate to your title -> Content -> Title News -> Select Existing Entry

Update the Title, Status, or Data for the entry, and click "Save Title News"

If plan to post unpublished entries for future release, this will be the way you transition them through published and archived state. It also lets you fix typos.

Delete Title News

Once an entry is no longer needed, you can delete it in Game Manager. Find the entry you wish to modify:

Game Manager: Navigate to your title -> Content -> Title News -> Checkbox for Existing Entry

Select the Title News entries you wish to delete, and click "X Delete Title News"



Did you find this helpful?