Wednesday, September 28, 2011

G+7 - +1 button does immediately update its state after adding +1 to a post

I have just noticed that something changed in the Google+ infrastructure and the +1 button in the G+7 desktop gadget does not properly update its state after adding +1 to a post, because there seems to be a significant delay in propagating the added +1 to the message stream. The +1 does get added, but the button stays white instead of turning blue. Refreshing the message a couple of times fixes things.

This used to work when I implemented this functionality (the update was immediate), so something must have changed at Google.

Anyway - fix is coming with version 1.7, which is going to be available very soon (probably after weekend). I am going to:
  • add a delay before updating the page
  • flip the +1 button state manually after update without waiting for the message stream update

Friday, September 23, 2011

G+7 version 1.6 out - authentication problems fixed

Since I removed all .NET components from G+7, I started receiving bug reports from people who could no longer log in to Google+ with my gadget. What was really weird - I was unable to reproduce this on any of my Windows 7 machines, and I have quite a few of these, in all sorts of flavours - 32 bit, 64 bit, on laptops, desktops, workstations, whathaveyou.

Anyway, the problem started to look serious, as quite a lot of people seemed to have this problem.

My assumption was that the gadgets share cookies with the Internet Explorer, which the documentation at MSDN seemed to imply (it is not a very good documentation, mid you, there is a lot of guessing involved). So if you logged in to Google+ with Internet Explorer, the gadget gets logged in too.

Apparently, this is not entirely true, and there are circumstances where the cookies are not shared.
They do seem to always be shared on 32 bit windows. On 64 bit, not quite. I happened to have "Internet Explorer 9 Preview" installed on my 64 bit machine, and it worked. But when I uninstalled it (on a hunch), suddenly I too got locked out of Google+ in my gadget.

So the question was - what's going on? And most of all - how do I let people log in reliably? After much head-scratching it started to look like the gadget is not exactly tied to Internet Explorer. What it does get tied to is your .NET platform. So if you run a .NET application that has "Web Browser" control embedded in it, you point this at plus.google.com and authenticate with it, then the gadget is let in too.

Well, how weird. But, in absence of useful Google+ API (the current attempt is very very lacking - Google, are you listening?), this is the only way.

So, I have released version 1.6 of the G+7 gadget, which brings back the .NET based authenticator. It is more lightweight and does not attempt to log you in automatically, but it seems quite reliable.

Try it here: http://www.kalamonsoft.com/serve?file=gp7/1.6.0.0/gplus7.gadget

Thursday, September 22, 2011

Twitter "Tweet" button does not count tweets? You may be doing it wrong :)

Some time ago, I decided to add the Twitter "Tweet" button to subpages of kalamonsoft.com, so that you could share your feelings about the software I make. The problem was - the button was not counting tweets. Now, it could mean that nobody cares to share their opinion about my products on Twitter, but it was unlikely, as Facebook and Google+ counters did go up.

Searching google did not help at all. I was just about to give up on this button, but I found this Twitter development discussions place, where you could ask questions and hopefully somebody listens. So I asked my question, and lo and behold, @episod answered (praise this guy).

The problem was - in order for the button to work, the HTTP HEAD request has to be properly handled by your site. Now, for most of the self-hosted sites this is not a problem as web servers have this built-in. But I am hosting my site on Google App Engine, and the site is implemented in Python. I am providing handlers to HTTP requests by overriding some methods of the webapp.RequestHandler class. Typically only the get() or post() method is overriden. Which makes HTTP HEAD not work - an error is returned and the twitter button does not like this.

After I added a trivial head() method override, the twitter button immediately started to work. 

So, if you want the twitter button to work on your site, remember to handle HEAD requests properly.

Tuesday, September 20, 2011

DeskBeam Junior screencasting app - new version available

Today I have released new early access preview version (0.9.3) of DeskBeam Junior screencasting application. This version is pretty close to what the actual final 1.0 release will look like. There are a couple of minor bugs with background audio trimming left, but they don't affect final (WMV-compressed) capture files.


The big features of this EAP are
  • screencasting and screen captures from secondary monitors
  • fixes for captures at increased DPI sizes (important for folks with bad eyesight :))
  • autoupdate fixes
  • a bunch of other bugfixes

As you can see, visually not much changed, other than the addition of the monitor selection dropdown. But there is quite a lot going on under the hood.


I have also added a "welcome" message in the player. Not a big deal, just a cosmetic change.

As usual, you can download new DeskBeam Junior version from here

Monday, September 19, 2011

Trying to implement sharing posts - more fun reverse-engineering Google+

As promised in my previous post, I have just released G+7 version 1.5, which supports adding +1s to posts.

With this out of the way, I am starting to investigate how to implement sharing posts. Of course, this is not (yet) possible with the freshly released Google+ API, so as usual, I have to do some reverse-engineering and add a lot of guessing. I am close to understanding how everything works, with selecting circles to share with and all the gory details. There is just one tiny detail that I have no idea about. So, Googlers, hackers, Ajax people, maybe you van help me out.

Apparently, to share a post on Google+, I have to POST this sort of JSON message to it:

[
    "share with nobody",
    "oz:104167973823715920379.13280d46e2b.0",

    "z134ip5j0ovce3a4a04cgvszxu2qdjrgk24",
    null,
    null,
    null,
    [],
    null,
    {
        "aclEntries":
            [
                {
                    "scope":
                        {
                            "scopeType":"focusGroup",
                            "name":"empty",
                            "id":"104167973823715920379.4c320e48a4b5a4a",                         

                            "me":false,
                            "requiresKey":false,
                            "groupType":"p"
                        },
                    "role":20
                },
                {
                    "scope":
                        {
                            "scopeType":"focusGroup",
                            "name":"empty",
                            "id":"104167973823715920379.4c320e48a4b5a4a",
                            "me":false,
                            "requiresKey":false,
                            "groupType":"p"
                        },
                    "role":60
                }
            ]
    },
    true,
    [],
    false,
    false,
    null,
    [],
    false,
    false
]


Believe it or not, but I know what all the above long numbers are (104167973823715920379 is some sort of category marker or whatever that can be retrieved from another Ajax call, 4c320e48a4b5a4a is the circle ID and z134ip5j0ovce3a4a04cgvszxu2qdjrgk24 is the post ID). The only thing I have no idea about is the stuff in the red. It looks like some sort of a timestamp or something, but unlike regular Google+ timestamps (which are just new Date().getTime() Javascript fuction results), this one has some hex numbers in it (or so it seems).

So, if you are able to help me out here, just let me know.

Or, if you are a Googler working on the Google+ API, feel free to just implement this functionality in the next rev or G+ API. I would really be grateful if I could just dump this stupid reverse-engineering stuff and use a proper API.

UPDATE (12 Oct 2011):

the mysterious part kinda looks like timestamps (milliseconds since 00:00 01.01.1970)  in hex.

13280D46E2B is 1316421398059 in decimal, which is some time on Sept 19th 2011, which is when I conducted the experiments and when the post was made.

Will I be able to implement sharing soon? Find out tomorrow

Friday, September 16, 2011

+1 button in G+7 strikes back

Well, a second post today, just to let you know that the +1 button in G+7 desktop gadget is coming along nicely and will be available on Monday, when I release version 1.5. Stay tuned

UPDATE: G+7 version 1.5 (with the +1 button and other good stuff) is available here: http://www.kalamonsoft.com/gp7

Another Day, Another Release - G+7 version 1.4 is out

G+7 has been using an external, auxiliary application (googleauthenticator.exe) to perform authentication in Google+. This caused quite a few problems. The external application introduced dependancy on .NET framework. Some users with non-latin languages reported problems with authenticating, which was caused by the authenticator using heavy screen-scraping techinques to perform authentication. Some virus scanners (esp. Norton) flagged the authenticator as a potential threat, as it launched from a non-standard location (gadget installation directory).

But worst of all, the authenticator was a total hack and a worakround for not being able to properly log in to Google+.

Well - the authenticator is no more. Starting with G+7 version 1.4 (released a minute ago), G+7 authenticates using your regular Internet Explorer credentials. It became more lightweight, it does not depend on any external frameworks, it behaves better. Enjoy.

As usual, you can get G+7 from here

Thursday, September 15, 2011

G+7 version 1.3 - with support for adding comments. And problems with Microsoft Live Gallery

For the last week, I have been working hard on providing support for adding comments to posts from within the post view in G+7.

This required quite a lot of effort, as I had to do a lot of reverse-engineering of Google+ Ajax calls. First - to dynamically reload the post after the comment is added and second - to actually post a comment. It took me a while to figure out everything and put all the pieces together, but eventually I was successful.


So this is what the result looks like
I hope you will like the new functionality as much as I do.You can install G+7 by following this link: http://www.kalamonsoft.com/gp7By the way - for a short while, G+7 was available on Microsoft's Windows Live Gallery. But I have just noticed that something broke, and G+7 download link no longer works. I am not sure what exactly broke the link, but I took the gadget offline, until the problem gets fixed. I submitted an update and hopefully things will get corrected by Microsoft people. However, it seems to be taking them a while to respond to update requests (last time it was around 2 weeks). Please stay tuned.

Saturday, September 10, 2011

DeskBeam Jr error - please contact me

To whomever anonymously posted a bug in our bugtracker about the crash in DeskBeam Junior - please try to install Microsoft runtime redistributable package from http://www.microsoft.com/download/en/details.aspx?id=5555 and try again

Ah, and contact me :)

Thanks

UPDATE: the error has already been fixed

Thursday, September 8, 2011

Over Quota at Google Apps Engine :)

Oh dear. You guys are amazing me. Suddenly so many people started to download G+7 that my resource usage at Google Apps Engine went over free quota. Who knew it would happen on the third day :)

So, the site is intermittently unavailable. I have enabled billing and we should be back online in 20 minutes. At least this is what Google says.

Sorry about the mess

G+7 version 1.2 - now with support for Circles

In my last post, I mentioned that I have been working on providing support for Google+ circles. Well, today I have released G+7 version 1.2, in which circles support became available for public consumption.

Here is how circles work in G+7
After logging in, if you want to limit the stream of updates to a certain circle, simply select this circle from a dropdown in the settings panel, as shown in the illustration to the left.
If you select a circle, and additional icon (a sort of b/w mini "Circles" icon from Google+) shows up in the gadget's header. When you hover your mouse over the icon, it shows you the circle name in the tooltip. When you click on the icon, it opens the circle's feed in your browser.


You can get version 1.2 of G+7 here. Try it and let me know what you think
Plans
I have big plans for the future. I will be adding support for commenting, sharing posts and for adding +1s to them. Stay tuned. You can find information about updates in the blinking icon in the gadget itself, or on twitter

Wednesday, September 7, 2011

G+7 And Google+ Circles

I am working on G+7 version 1.2. The big feature of this version is going to be the ability to filter the message stream by circles.
The feature is coming along nicely.
Actually it seems to be much easier than I expected, because it looks like jQuery is very much able to properly talk to Google+ with valid credentials, if I prod it sufficiently hard, so I can get rid of most of the .NET-based helper apps

Anyway - stay tuned

UPDATE: support for circles is now available with G+7 version 1.2

Tuesday, September 6, 2011

G+7 Google+ gadget - version 1.1.0.0: fun with +1 button

Today I have released version 1.1.0 of the G+7 Windows desktop gadget.

The original plan for this release was to add the +1 button to every message, so that you could quickly +1 a post without having to open it in the browser. Unfortunately, the reality proved to be more complicated than my hopes. It seems like the button, while working fine for web pages (like this one), does not really behave properly for posts on Google+ itself. It does render the number of +1s correctly, however clicking on it, and passing the post's URL as the href parameter (which is an URL like this one) does not increase +1 count on the post page. I am not exactly sure what clicking on the button actually does, but it is not what one would expect.

So, instead, I have provided just a read-only number of +1s on a post, and a note to remind you if you were one of the +1ers or not (sorry CmdrTaco for using your post for illustration purposes. I hope you don't mind)


The +1 button functionality will come later. To implement it, I have to reverse engineer the Ajax call that Google+ itself uses to bump the +1 on a post (I have a pretty good idea about how to do it) and create some mini-app in .NET invoked from teh gadget to do the bumping.

Either that or some jQuery trick may be possible as I have noticed that once I perform the login from a helper app that contains an embedded IE control, the gadget itself seems to become aware of all auth cookies that Google+ requires.

Anyway - the lack of API for Google+ is a royal pain in the arse and a real shame. I hope Google gets its act together soon, as having to reverse-engineer inner workings of G+ web pages to implement any standalone G+ client is not a good long-term strategy

Monday, September 5, 2011

G+7 - Google+ Windows Desktop Gadget


Last week, I created and released G+7 - a Windows 7/Vista desktop gadget that displays live stream of updates from your Google+ friends.

The implementation was a bit tricky, first of all because of the face that Google+ does not offer any sort of official API. So I had to resort to reverse engineering Ajax calls made by Google+ web page to fetch posts. Second complication was caused by the face that Windows desktop gadgets are pretty much pure javascript, and because of that they have trouble creating and using authentication cookies that Google uses - like I said, there is no API available to authenticate you programmatically to Google+, so some hacks had to be made, some .NET code used to retrieve cookies as well as fetching update streams.

All of this makes G+7 a bit of a hack job.

But anyway - I suppose it is quite useful to some people, as I have been seeing quite a lot of downloads over the weekend.

I am planning some additional fucntionality in the future:

  • posting comments to messages
  • sharing posts
  • +1 button

Give it a try

Here are some screenshots