微擎发送图文消息

 

$custom = array(
                'touser' => 'oXo3is-YksITdG35n4tTKBKog7ak',
                'msgtype' => 'news',
            );
            $custom['news']['articles'] = array(
                    // 注意这里的article这里是二维数组
                    // 不然会报44003 图文为空
                    array(
                      'title' => urlencode($activity['title']),
                      'description' => urlencode($activity['description']),
                      'url' => tomedia($this->createMobileUrl($filename, array('op' => 'detail'))),
                      'picurl' => tomedia($_W['attachurl'] . $activity['picurl'])
                )
            );
            $account_api = WeAccount::create();
            $result = $account_api->sendCustomNotice($custom);

 

相关文章:

  • 2021-04-14
  • 2021-11-27
  • 2021-12-16
  • 2021-09-14
  • 2022-12-23
  • 2021-10-06
  • 2021-09-17
  • 2021-12-16
猜你喜欢
  • 2021-11-08
  • 2021-09-21
  • 2022-12-23
  • 2021-12-15
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案