Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
accountfacebook.php
1<?
2
4
6
8{
9 const TYPE_CODE = 'facebook';
10
11 protected static $listRowMap = array(
12 'ID' => 'ACCOUNT_ID',
13 'NAME' => 'NAME',
14 );
15
16 public function getList()
17 {
18 return $this->getRequest()->send(array(
19 'methodName' => 'marketing.account.list',
20 'parameters' => array()
21 ));
22 }
23
24 public function getProfile()
25 {
26 $response = $this->getRequest()->send(array(
27 'methodName' => 'marketing.profile',
28 'parameters' => array()
29 ));
30
31 if ($response->isSuccess())
32 {
33 $data = $response->fetch();
34 return array(
35 'ID' => $data['ID'],
36 'NAME' => $data['NAME'],
37 'LINK' => $data['LINK'],
38 'CURRENCY' => $data['CURRENCY'],
39 'PICTURE' => $data['PICTURE'] ? $data['PICTURE']['data']['url'] : null,
40 );
41 }
42
43 return null;
44 }
45
46 public function getInstagramList()
47 {
48 return $this->getRequest()->send(array(
49 'methodName' => 'marketing.account.instagram.list',
50 'parameters' => array()
51 ));
52 }
53}