This seems to happen about 2-3 times a year. Facebook will change the way that pokes are processed both via the browser and on the backend. While there is no proof that Facebook is doing this purposefully to disable the autopoke script, it does break the script and produces error 1.1. This error code means that the autopoke script received a response from Facebook that wasn't expected and could not process the poke any further.
As I've stated before, I do not plan on releasing fixes to autopoke 3.5. I'm actively developing 4.0 to replace 3.5, which will include an adaptive regular expression to be able to execute the pokes without having a perfect match. However, this is proving harder than I initially realized.
(Note, another user fixed 3.5 and has released it on userscripts.org.)
There are about eight different places that Facebook can change that could break the script. I won't run through them all here, but needless to say, it is impossible to predict and anticipate these changes. For example, prior to this last update, the ID that was assigned to the poke DIV element was named pagelet_netego_pokes. Facebook has renamed the DIV element to pagelet_pokes.
Facebook uses ajaxify to load a large majority of it's modules (e.g. pokes, birthdays, stories, photos, etc). This means most of these elements load in the background. Instead of waiting for these elements to completely load, the 4.0 script now downloads a copy of your homepage to evaluate. This fixes a HUGE bug where pokes were not being processed because the elements do not completely load.
Even though the script doesn't use the DIV element, it still relies on the ID, which is used within ajaxify to actually load the poke node. Unfortunately, this is something that cannot be changed due to the mere fact that Facebook can change this div to something completely random.
Facebook has already done this to many of their elements. If you view the source of the Facebook frontpage, you'll notice many of the linked script names are Df69GCI-zBW.js, 4gR9cTpQYHa.js, etc. I assume this is done so that the files can only be used once can the source cannot be downloaded conveniently. Those who know what they are doing (like yours truly) can download these files without much hassle.
The poke link detection is based on the fact that the poke engine (e.g. the actual webpage that processes all pokes) has the word "poke" in it. Originally, the link detection was based on the link text having the word "poke" in it. This was changed to allow non-English speakers to use the script. If Facebook changes things again so that these IDs are randomized, the script will have to fail-back to searching for the work "poke" within the link text, breaking the script for non-English users.
Another change that Facebook has made is how pokes are processed. This used to be a POST form, which meant encoding the form parameters. But now, it looks like Facebook is changing this to GET. (FWIW, this used to be how Facebook did things back in the day.) Unfortunately, this is something that the script cannot anticipate and must be hard-coded.
As development on 4.0 continues, I will attempt to make the script as adaptive as possible. But please understand that it is impossible to anticipate everything. Hopefully, it will be more resilient than it's predecessors.
Glad to see this autopoker it's kick ass to have (Was since it won't work anymore) but i can't wait for the new update. I Hope to have this soon cause it was very very helpful.
ReplyDeleteis there any chance you could update the script to learn when you do and don't have pokes, and refresh the page when it does ? because as of right now, I'm using your auto-poke (which I will contribute a donation to, I believe you have a good idea with that!) and a simple auto-refresh script I wrote to refresh my home page every thirty seconds, however... it's impossible to read my home feed in when my page is constantly refreshing. XD
ReplyDeleteobviously I don't think EVERYONE would appreciate that, so maybe it was not such a good idea.
BUT ANYWAY.
keep up the good work. :)
@7alFl!ck: Yes, this something that is already planned:
ReplyDeletehttp://tailgate-blog.blogspot.com/2011/04/major-milestone-achieved.html