0
# Social Features
1
2
Social interactions including sharing, wall posts, communities, stories, and VK platform integration for connecting users and content.
3
4
## Capabilities
5
6
### Content Sharing
7
8
Share links and content with VK users and communities.
9
10
```typescript { .api }
11
/**
12
* Share content with VK users
13
* @param props.link - URL to share (optional)
14
*/
15
function send(method: 'VKWebAppShare', props?: {
16
link?: string;
17
}): Promise<LinkShareResult[]>;
18
19
interface LinkShareResult {
20
type: string;
21
data: any;
22
}
23
```
24
25
### Community Management
26
27
Join, leave, and interact with VK communities.
28
29
```typescript { .api }
30
/**
31
* Join a VK community
32
* @param props.group_id - Community ID to join
33
*/
34
function send(method: 'VKWebAppJoinGroup', props: {
35
group_id: number;
36
}): Promise<{ result: true }>;
37
38
/**
39
* Leave a VK community
40
* @param props.group_id - Community ID to leave
41
*/
42
function send(method: 'VKWebAppLeaveGroup', props: {
43
group_id: number;
44
}): Promise<{ result: true }>;
45
46
/**
47
* Get community information
48
* @param props.group_id - Community ID
49
*/
50
function send(method: 'VKWebAppGetGroupInfo', props: {
51
group_id: number;
52
}): Promise<GroupInfo>;
53
54
interface GroupInfo {
55
id: number;
56
name: string;
57
screen_name: string;
58
photo_100: string;
59
photo_200: string;
60
}
61
```
62
63
### Wall Posts
64
65
Create and manage wall posts on user or community walls.
66
67
```typescript { .api }
68
/**
69
* Show wall post creation dialog
70
* @param props - Wall post configuration
71
*/
72
function send(method: 'VKWebAppShowWallPostBox', props: WallPostRequestOptions): Promise<{
73
post_id: number | string;
74
}>;
75
76
interface WallPostRequestOptions {
77
message?: string;
78
attachments?: string;
79
owner_id?: number;
80
friends_only?: 0 | 1;
81
from_group?: 0 | 1;
82
signed?: 0 | 1;
83
}
84
85
/**
86
* Open existing wall post
87
* @param props.post_id - Post ID
88
* @param props.owner_id - Post owner ID
89
*/
90
function send(method: 'VKWebAppOpenWallPost', props: {
91
post_id: number;
92
owner_id: number;
93
}): Promise<{ result: true }>;
94
```
95
96
### Stories
97
98
Create and manage VK Stories.
99
100
```typescript { .api }
101
/**
102
* Show story creation interface
103
* @param props - Story creation options
104
*/
105
function send(method: 'VKWebAppShowStoryBox', props: ShowStoryBoxOptions): Promise<{
106
result: true;
107
}>;
108
109
interface ShowStoryBoxOptions {
110
background_type?: 'image' | 'video';
111
url?: string;
112
stickers?: Array<{
113
sticker_type: string;
114
sticker: any;
115
}>;
116
}
117
118
/**
119
* Subscribe to story app updates
120
* @param props.story_owner_id - Story owner ID
121
* @param props.story_id - Story ID
122
* @param props.sticker_id - Sticker ID
123
* @param props.access_key - Access key (optional)
124
*/
125
function send(method: 'VKWebAppSubscribeStoryApp', props: {
126
story_owner_id: number;
127
story_id: number;
128
sticker_id: number;
129
access_key?: string;
130
}): Promise<{ access_key: string }>;
131
```
132
133
### Community Features
134
135
Add app to community and manage community interactions.
136
137
```typescript { .api }
138
/**
139
* Add app to community
140
* @param props.hide_success_modal - Hide success confirmation (optional)
141
*/
142
function send(method: 'VKWebAppAddToCommunity', props?: {
143
hide_success_modal?: boolean;
144
}): Promise<{ group_id: number }>;
145
146
/**
147
* Allow messages from community
148
* @param props.group_id - Community ID
149
* @param props.key - Authorization key (optional)
150
*/
151
function send(method: 'VKWebAppAllowMessagesFromGroup', props: {
152
group_id: number;
153
key?: string;
154
}): Promise<{ result: true }>;
155
```