我正在使用 aws-sdk-php 发送通知,我搜索了文档但找不到任何示例。
我尝试了以下代码,但仍然无法为通知设置 TTL(也尝试过使用数据类型编号):
参考:http ://docs.aws.amazon.com/sns/latest/dg/sns-ttl.html#sns-ttl-console
$response = $client->publish(array(
'TargetArn' => 'My ARN',
'Subject' => 'Test Notification',
'MessageAttributes'=>array(
'AWS.SNS.MOBILE.GCM.TTL' =>array(
'DataType' => 'String',
'StringValue' => '10',
)
),
'Message' =>json_encode(array(
'message'=>'New Message !',
)),
));
路上的任何灯光都会有所帮助
哈沙尔