Twitter follower not working any more
-
Hi,
Twitter now blocks the call made by the plugin, so we now have to call the twitter API.
I made the following changes and it works :
file /wp-content/themes/author/includes/widgets/social.php (l. 39)
Remove :$url = "https://twitter.com/users/show/".$twitter_user; $response = @file_get_contents( $url ); $t_profile = new SimpleXMLElement ( $response ); $twitter_count = intval( $t_profile->followers_count );
Add
$response = twitter_api_get('users/show', ['screen_name' => $twitter_user] ); $twitter_count = (int) $response['followers_count'];
- The topic ‘Twitter follower not working any more’ is closed to new replies.