Sends a friend request, accepts an incoming friend request, or follows a user.

This method requires the following permissions: friends.

Parameters

user_id
integer (positive)

The identifier of the target user.

text
string

If sending a friend request, the message to send along with it.

Result

Returns one of the following:

  • request_sent – a friend request was sent
  • request_accepted – an incoming friend request was accepted, or the target user was following the current user and they’re now friends
  • followed – the current user was added as a follower of the target user without sending a friend request

Errors

174
Can't add oneself as a friend
175
Can't add this user as a friend because they blocked you
176
Can't add this user as a friend because you blocked them
242
Too many friends
Global errors may also occur when calling this method.