Title: [Plugin: HL Twitter] Pass tweetID using php
Last modified: August 20, 2016

---

# [Plugin: HL Twitter] Pass tweetID using php

 *  [fullgoodfood](https://wordpress.org/support/users/fullgoodfood/)
 * (@fullgoodfood)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-hl-twitter-pass-tweetid-using-php/)
 * I’m trying to use
 * `hl_twitter_display_widget(5,'425860927');`
 * but it doesn’t work (425860927 is the id of the twitter user). How do I use it
   like this?
 * I tried to amend functions.php to take a Twitter user name as it makes more sense
   but that only changed the View more tweets link to the username ; my amended 
   function is/ was
 *     ```
       if(is_string($twitter_user_id)){
       		//get tweets by name
       			$user = $wpdb->get_row($wpdb->prepare('
       				SELECT twitter_user_id, screen_name, name, num_friends, num_followers, num_tweets, registered, url, description, location, avatar
       				FROM '.HL_TWITTER_DB_PREFIX.'users
       				WHERE screen_name=%s
       				LIMIT 1
       			', $twitter_user_id));
       			$single_user = ($wpdb->num_rows==1) ? true : false;
       			if($single_user) $query_args['twitteruserid'] = $user->twitter_user_id;
       			echo $user->twitter_user_id;
       		}else{
       ```
   
 * and then the normal code on the other side of the if..else. followed by
 *     ```
       //if($single_user) $query_args['twitteruserid'] = $twitter_user_id;
       	$query = hl_twitter_build_tweets_query_object($query_args);
       ```
   
 * Any ideas how make this work?
 * Thanks.
 * [http://wordpress.org/extend/plugins/hl-twitter/](http://wordpress.org/extend/plugins/hl-twitter/)

The topic ‘[Plugin: HL Twitter] Pass tweetID using php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/hl-twitter.svg)
 * [HL Twitter](https://wordpress.org/plugins/hl-twitter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hl-twitter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hl-twitter/)
 * [Active Topics](https://wordpress.org/support/plugin/hl-twitter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hl-twitter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hl-twitter/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [fullgoodfood](https://wordpress.org/support/users/fullgoodfood/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-hl-twitter-pass-tweetid-using-php/)
 * Status: not resolved