Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 685 Bytes

create.md

File metadata and controls

25 lines (16 loc) · 685 Bytes

Friendships Create Request

Allows the authenticating users to follow the user specified in the ID parameter.

Returns the befriended user in the requested format when successful. May throw exceptions in case of failure.

use Widop\Twitter\Rest\Friendships\FriendshipsCreateRequest;

$request = new FriendshipsCreateRequest();

$request->setUserId('123546789');
$userId = $request->getUserId();

$request->setScreenName('noradio');
$screenName = $request->getScreenName();

$request->setFollow(true);
$follow = $request->getFollow();

$users = $twitter->send($request);

You can get more informations here.