Skip to content

How to add payload data? #25

@nutella

Description

@nutella

I've tried with something like:

$data = [];
$data['id'] = 10;
$data['link'] = 'https://www.github.com';
$client -> build($recipient, $notification, $data);

But got this error: "Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 3 passed to phpFCMv1\Client::build() must be an instance of phpFCMv1\Data or null, array given"

...but $data is an array...

What's wrong?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions