• I have a Twitter username field in my comment form, and I want to use this to get the profile picture from the user’s twitter account.

    This is the code I have at the moment, but it’s throwing up all sorts of errors? Any ideas what I could do to improve it?

    <?php
      $TwX=get_comment_meta( $comment->comment_ID, 'ta_twitter_field', true );
    
      $tweets = getTweets($TwX, 1, array('trim_user'=>false));
    
    	if(is_array($tweets)){
    		foreach($tweets as $tweet){
    			if($tweet['text']){
    				echo $tweet['user']['profile_image_url'];
    			}
    		}
    	}
    
    ?>

    https://www.ads-software.com/plugins/oauth-twitter-feed-for-developers/

  • The topic ‘Get data from comment field’ is closed to new replies.