docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GraphApi

    Contains functions and properties related to Graph APIs.

    Inheritance
    object
    JsObject
    GraphApi
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Meta.InstantGames
    Assembly: Unity.Meta.InstantGames.Sdk.dll
    Syntax
    public class GraphApi : JsObject

    Constructors

    GraphApi()

    Construct an instance of GraphApi

    Declaration
    public GraphApi()

    Methods

    RequestAsync(string, string, string)

    Performs a Graph API call and returns the result asynchronously.

    Declaration
    public WebTask<string> RequestAsync(string path, string method = null, string parameters = null)
    Parameters
    Type Name Description
    string path

    The Graph API path for the request.

    string method

    The HTTP method used for this request. GET is the default if not specified.

    string parameters

    The parameters sent as part of the request, serialized as a JSON string. This string must represent a JSON object such as {"key": "value"}.

    Returns
    Type Description
    WebTask<string>

    A WebTask<T> that resolves with an object, serialized as a JSON string, which contains the result of the Graph API call.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)