guyblade.com #/


PSN
Gamercard


2007 Jun 14 relm


Guy Blade Guy Blade---09:03:00


Finally got MySpace support working.
I finally got MySpace support working in XPost. It turns out that I probably would have had it working a week ago, but in a big block of text where I was sending information to MySpace I had a small error.



This is the original:



sw.Write(Util.buildPair("postMonth", now.Month.ToString()) + "&");

sw.Write(Util.buildPair("postDay", now.Day.ToString()) + "&");

sw.Write(Util.buildPair("postYear", now.Year.ToString()) + "&");

sw.Write(Util.buildPair("postHour", hour.ToString()) + "&");

sw.Write(Util.buildPair("postMinute",now.Minute.ToString()) + "&");

sw.Write(Util.buildPair("postDay", now.Day.ToString()) + "&");

sw.Write(Util.buildPair("postTimeMarker", marker) + "&");

sw.Write(Util.buildPair("subject", subject) + "&");

sw.Write("BlogCategoryID=0&");

sw.Write("editor=false&");

sw.Write(Util.buildPair("body", body) + "&");





This is the fix:



sw.Write(Util.buildPair("postMonth", now.Month.ToString()) + "&");

sw.Write(Util.buildPair("postDay", now.Day.ToString()) + "&");

sw.Write(Util.buildPair("postYear", now.Year.ToString()) + "&");

sw.Write(Util.buildPair("postHour", hour.ToString()) + "&");

sw.Write(Util.buildPair("postMinute",now.Minute.ToString()) + "&");

sw.Write(Util.buildPair("postTimeMarker", marker) + "&");

sw.Write(Util.buildPair("subject", subject) + "&");

sw.Write("BlogCategoryID=0&");

sw.Write("editor=false&");

sw.Write(Util.buildPair("body", body) + "&");





Did you catch it? I was sending the value of "postDay" twice. This meant that when I got it back in their preview page, I was getting a value of "day,day" for the value of "postDay". I have no iead why their server would do such a thing when presented with a second copy of a field during a POST request, but that is in fact what it seemed to do. This caused the hash they gave me to be wrong when I automatically fixed it during the second post and is why the error was showing up as an error with my timezone. There was nothing wrong with my timezone, per se, there was something wrong with the date they were using.



Published by XPost


Permalink to this post     Com/0

Archive
Copyright 2002-2019 Blade Libergnosis//Powered By Blogger