Unity SDK

FB.GameGroupCreate

Updated: Mar 2, 2018
Copy for LLM
Prompts to create a new Game Group. See that feature's documentation for details.

Parameters

public static void GameGroupCreate(
        string name,
        string description,
        string privacy = "CLOSED",
        FacebookDelegate<IGroupCreateResult> callback = null
)
Name Type Description Default
name
string
The name of the group you wish to create. Required
description
string
A short description of the group’s purpose. Required
privacy
string
The privacy of the group. OPEN groups’ content is visible to anyone; CLOSED groups can be found by anyone but their content is only visible to members; SECRET groups can only be found by their members.
'CLOSED'
callback
FacebookDelegate <IGroupCreateResult>
A callback which will be informed of the outcome of the dialog.

Example

FB.GameGroupCreate (
    "Wolf Clan",
    "The rallying point for the Wolf Clan: strategy, chat, and more.",
    "CLOSED",
    GroupCreateCallBack
);

void GroupCreateCallBack (IGroupCreateResult result) {
    if (result.ResultDictionary.ContainsKey("id")) {
        // log the current group ID
        Debug.Log(result.ResultDictionary["id"]);
    }
}