Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[消息的使用] 中 [上传素材文件] 的文档示例貌似有误 #168

Closed
lialosiu opened this issue Dec 3, 2015 · 2 comments
Closed

Comments

@lialosiu
Copy link

lialosiu commented Dec 3, 2015

上传素材文件】 <- 此文档的示例

<?php
use Overtrue\Wechat\Media;
// $appId = xxxx;
// $appSecret = xxxx;
// ...
$media = new Media($appId, $appSecret);
$imageId = $media->image(__DIR__ . '/demo.jpg'); // 上传并返回媒体ID

$message = Message::make('image')->media($imageId);

该部分的:

$imageId = $media->image(__DIR__ . '/demo.jpg'); // 上传并返回媒体ID
//   ^-------这里返回的并不是 image id,而是包含了 ['type', 'media_id', 'created_at'] 的 Array
$message = Message::make('image')->media($imageId);
//    照着示例写的话,这里直接进来了个 Array----^    貌似会造成无法处理

以上.

@overtrue
Copy link
Collaborator

overtrue commented Dec 3, 2015

@lialosiu OK,我更新一下

@overtrue
Copy link
Collaborator

overtrue commented Dec 3, 2015

@overtrue overtrue closed this as completed Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants