Answer the question
In order to leave comments, you need to log in
Am I making the right request to follow on Twitter?
With the help of this class I write following users. The code:
$settings = array(
'oauth_access_token' => "blabla",
'oauth_access_token_secret' => "blabla",
'consumer_key' => "blabla",
'consumer_secret' => "blabla"
);
$url = 'https://api.twitter.com/1.1/friendships/create.json';
$requestMethod = 'POST';
$twitter = new TwitterAPIExchange( $settings );
foreach($arUser as $name=>$info)
{
$postField = '?screen_name='.$info->screen_name.'&user_id='.$info->id.'&follow=true';
$follow = $twitter->setPostfields($postField)->buildOauth($url, $requestMethod)->performRequest();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question