XHanch Studio Log in | Register | Cart

Forum

Notifications
Clear all

Get tweets based on keyword search

7 Posts
3 Users
0 Reactions
3,816 Views
(@goalasso)
Posts: 3
New Member
Topic starter
 

Hello,

I have the XMT widget installed and working for my twitter account. So it shows all of my tweets and retweets.

However, I would also like to pull in to the widget tweets that contain certain hashtags/@. For example, if I add the following to the configuration for "Show tweets that contain these words", the twitter feed is empty and thus does not appear. If I remove these "words" the feed reappears. Any suggestions? I would like to display twitter feed items from others and I thought by using this feature I could do that. Does this feature only work on my tweets?

@RunKeeper, #RunKeeper

 
Posted : 21/10/2012 8:36 pm
XHanch
(@xhanch-alt)
Posts: 2105
Member Admin
 

Hello,

I have the XMT widget installed and working for my twitter account. So it shows all of my tweets and retweets.

However, I would also like to pull in to the widget tweets that contain certain hashtags/@. For example, if I add the following to the configuration for "Show tweets that contain these words", the twitter feed is empty and thus does not appear. If I remove these "words" the feed reappears. Any suggestions? I would like to display twitter feed items from others and I thought by using this feature I could do that. Does this feature only work on my tweets?

@RunKeeper, #RunKeeper

That option will only show tweets that contain both of the keywords.
Since you have no tweets that contains both @RunKeeper and #RunKeeper, so nothing is displayed.

For your case you should use the above solution.
Leave Show tweets that contain these words emtpy, then set your Additional criteria to:

1=1 or twt like '%@RunKeeper%' or twt like '%#RunKeeper%'
 
Posted : 21/10/2012 9:17 pm
(@goalasso)
Posts: 3
New Member
Topic starter
 

That option will only show tweets that contain both of the keywords.
Since you have no tweets that contains both @RunKeeper and #RunKeeper, so nothing is displayed.

For your case you should use the above solution.
Leave Show tweets that contain these words emtpy, then set your Additional criteria to:

1=1 or twt like '%@RunKeeper%' or twt like '%#RunKeeper%'

Thanks for the quick reply. You state that "since you have no tweets that contain". Does this mean that ONLY MY TWEETS are pulled in? What I want to do is pull in ANYONES tweets that have these keywords not just mine. So, for example, if you posted a tweet that contained "runkeeper" I would pull it in and it would be displayed along with my tweets. I am not seeing this occur. It seems to only pull in my tweets.

thanks again!

 
Posted : 21/10/2012 9:31 pm
XHanch
(@xhanch-alt)
Posts: 2105
Member Admin
 

Thanks for the quick reply. You state that "since you have no tweets that contain". Does this mean that ONLY MY TWEETS are pulled in? What I want to do is pull in ANYONES tweets that have these keywords not just mine. So, for example, if you posted a tweet that contained "runkeeper" I would pull it in and it would be displayed along with my tweets. I am not seeing this occur. It seems to only pull in my tweets.

This plugin can retrive your own tweets or other people tweets which addressed to you (@RunKeeper - if your twiiter account is RunKeeper).
Make sure that you enabled this option: Inc. replies to you?

 
Posted : 22/10/2012 2:29 pm
(@goalasso)
Posts: 3
New Member
Topic starter
 

This plugin can retrieve your own tweets or other people tweets which addressed to you (@RunKeeper - if your twiiter account is RunKeeper).
Make sure that you enabled this option: Inc. replies to you?

So, tweets not addressed to nor tweets that are not mine can not be retrieved? I am looking for a way to pull in ANY tweet with certain keywords. Do you know of any plugin that can do this -- pull in my tweets as well as tweets from anyone else that contain certain keywords?

Thanks again,
David

 
Posted : 22/10/2012 3:47 pm
XHanch
(@xhanch-alt)
Posts: 2105
Member Admin
 

If you want to utilize Twitter search system, you can tweak this plugin a bit.
You can edit this file (xhanch-my-twitter/method/public.php)

First, remove/delete these codes

$api_url = sprintf(
    ' http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=%s&count=%s'.($xmt_acc [$acc]['cfg']['inc_rtw']?'&include_rts=true':''),
    urlencode($xmt_acc[$acc]['cfg']['twt_usr_nme']),
    $lmt * 2
);
xmt_twt_raw_imp($acc, xmt_get_file($api_url), 'twt');

Then, change this code

$api_url_reply = ' http://search.twitter.com/search.atom?q=to:'.urlencode($xmt_acc [$acc]['cfg']['twt_usr_nme']);

To

$api_url_reply = ' http://search.twitter.com/search.atom?q=RunKeeper' 

Assuming that you want to search tweets that contains RunKeeper

 
Posted : 23/10/2012 12:05 pm
(@nicogroove)
Posts: 2
New Member
 

I've tried using / replacing this code but nothing changes. Actually, when I am editing it in the Plugin editor it shows that it is inactive (which might be the issue). Any ideas on how to "activate" this code on public.php?

 
Posted : 26/12/2012 12:16 pm
Share:

× Close Menu