0

使用 php SDK 通过 SNS 创建应用程序时出现错误。

代码:

$appName = "name";
$appPlataform = "APNS_SANDBOX";
$appAttributes = array(
    "PlatformCredential" => "...",
    "PlatformPrincipal" => "..."
);

$appArn = $sns->createPlatformApplication(array(
    "Name" => $appName,
    "Platform" => $appPlataform,
    "Attributes" => $appAttributes
        ));

错误:

Fatal error: Uncaught Aws\Sns\Exception\SnsException: AWS Error Code: MalformedInput, Status Code: 400, AWS Request ID: 3b169c54-6bfd-58e4-9480-d6c4931402f7, AWS Error Type: client, AWS Error Message: Top level element may not be treated as a list, User-Agent: aws-sdk-php2/2.4.3 Guzzle/3.7.2 curl/7.24.0 PHP/5.4.4 thrown in .../Aws/Common/Exception/NamespaceExceptionFactory.php on line 91
4

1 回答 1

1

目前有一个与此相关的问题。请参阅https://github.com/aws/aws-sdk-php/issues/136

于 2013-08-24T17:04:37.207 回答