Support » Plugin: Tweeple » Using Hashtag and Username?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jason

    (@themeblvd)

    I honestly do not know. —

    I know when you’re fetching a user’s timeline, Twitter API does not give you any way to add in any kind of search:

    https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline

    And when doing a search, according to the docs, you’re supposed to be able to do this:

    from:you #happyfor

    https://dev.twitter.com/docs/using-search

    … but I’m playing with this and it’s very spotty. I can only get the “:from” to work with gigantic Twitter accounts like @twitterapi.

    Plugin Author Jason

    (@themeblvd)

    This might help to explain why it’s difficult to pull Tweets “:from” just any Twitter account with the Search API.

    https://dev.twitter.com/docs/faq#8650

    That’s a shame. Looks like it isn’t doable then. I would need something that parsed my timeline then did its own search of those outside of twitter. Oh well, thanks for checking!

    Plugin Author Jason

    (@themeblvd)

    If you were to setup your own function from your own theme or plugin to display the tweets you can use Tweeple functionality something like this:

    function my_tweets() {
    
    	// The ID for the user timeline feed you setup in
    	// the admin. Maybe give it the max limit number.
    	$feed_id = 123;
    
    	$tweeple_feed = new Tweeple_Feed( $feed_id );
    	$feed = $tweeple_feed->get_feed();
    
    	foreach( $feed['tweets'] as $tweet ) {
    		if( false !== strpos( $tweet['text'], '#happyfor' ) ) {
    			//...
    		}
    	}
    
    }

    Thanks. Coding is going to be past my skill set though. I’ll try and find another way, but I don’t see one right now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using Hashtag and Username?’ is closed to new replies.