# Follow/Unfollow User

## Follow Users

To follow other users using our SDK, the process is straightforward and easy to use. Simply pass the `userId` of the user you want to follow, and our SDK will handle the rest.

Once you have identified the user you wish to follow, you can use our SDK's  `followUser` method to initiate the follow request. The method will handle the request process, whether it requires the target user's acceptance or not, depending on the [connection method setting](https://docs.social.plus/social-plus-sdk/social/follow-unfollow/..#user-connection-method-concept).

{% tabs %}
{% tab title="iOS" %}
{% embed url="<https://gist.github.com/amythee/40addba36b2b15245772d1b321c03fa7>" %}
{% endtab %}

{% tab title="Android" %}
{% embed url="<https://gist.github.com/amythee/f4173808623f4b5ffbe0b60c35477574#file-amityfollowrequestsending-kt>" %}
{% endtab %}

{% tab title="JavaScript" %}
{% embed url="<https://gist.github.com/amythee/911c7712c476bf81cdd0db49a1c47427#file-followuser-js>" %}
{% endtab %}

{% tab title="TypeScript" %}
{% embed url="<https://gist.github.com/amythee/c05512aa27368a8fda8e63a6713db1f9#file-follow-ts>" %}
{% endtab %}

{% tab title="Flutter" %}
{% embed url="<https://gist.github.com/amythee/1d8cf850e0d4f6f9099b13fa1a7f29c1#file-amityfollowsendrequest-dart>" %}
{% endtab %}
{% endtabs %}

## Unfollow Users

To unfollow a user, simply call the `unfollowUser` method with the `userId` of the user you wish to unfollow. The method will handle the unfollow process, removing the connection between the two users and updating the following and follower counters accordingly.

{% tabs %}
{% tab title="iOS" %}
{% embed url="<https://gist.github.com/amythee/002167ed9d26decdad542cda326a1a0d>" %}
{% endtab %}

{% tab title="Android" %}
{% embed url="<https://gist.github.com/amythee/31b25590c913eacec07869b56b95e098#file-amityfollowrequestwithdrawal-kt>" %}
{% endtab %}

{% tab title="JavaScript" %}
{% embed url="<https://gist.github.com/amythee/100db9bc01230613b99453edf10ed22f#file-followuser-js>" %}
{% endtab %}

{% tab title="TypeScript" %}
{% embed url="<https://gist.github.com/amythee/4c6bc6cb938d7d643c7d3bd15486f8ee#file-unfollow-ts>" %}
{% endtab %}

{% tab title="Flutter" %}
{% embed url="<https://gist.github.com/amythee/b3eaaf0b91c83b5b3f1fde3f90a52fde#file-amityfollowwithdrawrequest-dart>" %}
{% endtab %}
{% endtabs %}
