Notice: The Tweet Nest support forum has been moved to the GitHub issue tracker. Please report all issues there. Thank you!
Post a reply

Hashtags, as categories

A forum thread posted in Tweet Nest by paulmist on Jan 30th, 2012

paulmist OP

Hello,

I’m about to start messing about with your code and try and parse hashtags from tweets and save them in the database to use as categories.

Is there any existing functionality I should be using, or any pointers on perhaps where to start?

Cheers!

Paul

Reply

graulund

You could probably create it as an extension (see the images extension on how that works), doing something with the tweet whenever it’s loaded in; that is, have a function in your extension called “enhanceTweet” like the one in the images extension.

Then it would search $tweet[‘text’] for any hashtag and then use the $db object to save it somewhere, and perhaps alter the tweet in question by changing some values in the tweets table for tweets that have the same id as the one you’ve got opened right now (which is only going to be that one tweet).

Reply

paulmist OP

What about creating categories when the loadtweets.php file is run? Could we not draw the hashtags directly from the JSON at that point?

Reply

graulund

You could definitely do that, if you’re fine with altering the code directly. Then you might as well alter the url so it has “include_entities=1”, which lets Twitter detect the hashtags for you, and send them along separately in a special field in the array.

Reply

paulmist OP

That’s my plan. I added that to the URL already, now I just have to work out everything else!

Reply

BrianKingstonFL

Hi,

I’d like to know if you have had any success with tracking the has tags?

If so could you share the method? I’m really not a prgrammer but I’d love to do that. Any help would be appreciated.

Thanks!

Reply

paulmist OP

Hello.

I’m making a little headway with this.

I’ve got entities coming in with the tweets now.

Next step is to push them to the DB.

If you can offer any guidance on where I might start looking in the code to make this happen I’d appreciate it very much.

Thanks

Paul

Reply

Post a reply to this thread

Please log in with your Twitter account using the button below in order to participate.

Connect with Twitter