Showing posts with label Twitter Hash Tag Scanner. Show all posts
Showing posts with label Twitter Hash Tag Scanner. Show all posts

Thursday, 13 June 2013

Changes to Twitter API

Changes to Twitter API 1.1

As Twitter has changed their API from 1.0 to 1.1 which is totally reliant on oAuth and JSON I have had to take down the links to the Twitter Hash Tag Scanner as it was reliant on the old search RSS feeds which are no longer available.

I have had a quick look but it will take some time to re-develop and involve adding in consumer keys, access keys and so on. You would probably get blocked after a few scans anyway as you would have to login to your own twitter account to make the scans and their rate limits would apply.

Therefore I don't think a new version will be forthcoming to anyone who has purchased a previous version I can only apologise. It's a shame as I wanted to extend it but if I cannot make thousands of scans without being blocked the application just won't work with Twitters new API.

As for the Strictly TweetBot Wordpress plugin I have updated this to use the new API and I have tested it on a couple of my own blogs and it seems to be working.

Today was the switch off day so if you were using the plugin you would have noticed either:
  • No tweets being sent out when you posted.
  • In the Twitter message console lots of error messages saying Tweet not sent or Authentication error.
However if you upgrade to version 1.1.3 then this should fix the problem. 

You can get the latest version from Wordpress.

Also I am pissed off!

And I only just wrote a Twitter Direct Message Responder in PHP the other day which was working fine up until tonight as well!

Damn bloody Twitter.

Even with me being logged in and authenticated I was trying to get a list of my followers and for some reason I kept getting a message like this:

{"errors":[{"message":"Bad Authentication data","code":215}]}

I did write a post to the developer discussion boards on Twitter but as always I have cracked the problem before I got a response.

Basically I am using a very common Twitter / oAuth class which is used by my Twitter Plugin and many other plugins use it as well.

To fix the problem I had to do the following:

Change line 29 in the Twitter class to:

 /* Set up the API root URL. */
 public $host = "https://api.twitter.com/1.1/";


This resolved the issues in my own wordpress plugins which solved sending normal tweets out but to get my Direct Message Responder code working I needed to do one more thing.

Whereras before I was making use of a simple file_get_contents call to an XML feed which Twitter has now abandoned for JSON I had to change this to use the inbuilt HTTP request functions in the Twitter class e.g

$response = $oauth->get($followers_url);

This returns 20 of your new followers (I have not worked out how to get more yet) but in a JSON object.

You can either loop through the nested objects of you could use json_encode to convert the object to a string to do a simple regex to just get a list of screen_names e.g

$body = json_encode($response);

preg_match_all('@"screen_name":"([\s\S]+?)",@i',$body,$matches,PREG_SET_ORDER);

And that solved the problem!

Tuesday, 30 October 2012

New version of the SEO Twitter Hunter Application

Introducing  version 1.0.4 of the Twitter Hashtag Hunter Application

I have just released the latest version of the popular windows application that is used by SEO experts and tweeters in combination with my Strictly Tweetbot Wordpress plugin to find new @accounts and #hashtags to follow and use.

Version 1.0.4 of the Twitter HashTag Hunter application has the following features:
  • A progress bar to keep you informed of the applications progress in scanning.
  • More detailed error reporting including handling the fail whale e.g 503 service unavailable error.
  • More HTTP status code errors including 400, 404, 403 and the 420 Twitter Scan Rate exceeded limit.
  • Clickable URL's that open the relevant Twitter account or Hash Tag search in your browser.
  • Multiple checks to find the accounts follower numbers to try and future proof the application in case Twitter change their code again.
  • A new settings tab that controls your HTTP request behaviour.
  • The ability to add proxy server details e.g IP address and Port number to scan with.
  • The ability to change your user-agent as well as a random user-agent switcher that picks between multiple agent strings for each HTTP request when a blank user-agent is provided.
  • An HTTP time-out setting to control how long to wait for a response from the API.
  • A setting to specify a wait period in-between scans to prevent rate exceeded errors.
  • A setting to specify a wait period when a "Twitter scan rate exceeded" error does occur.
  • Extra error messages to explain the result of the scan and any problems with the requests or settings.
The main new feature of 1.0.4 is the new settings panel to control your scanning behaviour. This allows you to scan through a proxy server, specify a user-agent, set delay periods in-between scans and the "Twitter Scan Rate exceeded limit" error which occurs if you scan too much.

Changing the Scanner Settings

For Search Engine Optimisation (SEO) experts or just site owners wanting to find out who they should be following and which #hashtags they should be using in their tweets this application is a cheap and useful tool that helps get your social media campaign off the ground by utilising Twitters Search API.

You can download the application from the main website www.strictly-software.com.