Mar 1 2007

Using PHP to connect to the new Google Blogger API

blogmove.gifNow, I have been battling with this on and off for ages. Soon Google will be moving all ‘old’ Blogger accounts over to their Google Account system. This means that all those people who have third party applications to post to their blogspot Blogger accounts will need to switch over to the Google login and system (and get a Google Account, if they don’t already have one) – rather like Yahoo! will be doing to flickr users on the Ides Of March – Beware! :)

All these third party apps will need to be upgraded too. The thing is, we all want security right? So, you really want to go and register your application with Google to remove the big yellow Warning box you might start seeing a lot of soon.

The documentation to do this with PHP has been non-existent, which I found pretty weird as I bet there are plenty of PHP-based systems out there offering the ability to post to Blogger. (BlogHUD is one that I created for Second Life, which is a model system for something bigger and ‘real’ I have planned soon)

So, for those of you out there who are looking to do this for your own PHP systems hop on over to this post of mine on the Google Group for Google Accounts (crossposted to the Blogger Dev Group) and see the link to the source PHP example I have provided down at the bottom of that post.

For those who can’t be arsed reading all the intro and explanation, here is a link to the PHP source example, where there are plenty of comments to explain what is going on, each step of the way.

This example only goes as far as listing a users’ blogs, after obtaining a non-expiring secure token for your users, which itself has to be generated using secure signing methods. You’ll want to use this new-found knowledge to do cool stuff like post to the users’ blogs.

http://kosso.co.uk/PHP/blogger_google_secure_AuthSub.phps

Man, am I glad to get that bug out of my head! It’s been there for months!!! I hope this helps others get the same out of theirs! :)

You should be able to use this example to build a connection to any of the Google services. This is just using Blogger.

I will finish by saying that WordPress support for doing the same thing is EASY!! No problems. Ever. Whatsoever. Great job! :) Rockin!

I’ll also add that I don’t do this sort of thing much – and by that I mean posting my code up online. But I have learned SO MUCH (if not all foundation knowledge) on the web, that doing stuff like this makes me feel good. I can feel the Karma restoring – step by step ;)


Feb 21 2007

Blogger Google Data support?

OK. So I have recently been working to support the new Blogger / Google logins to post to Blogger blogs. I was easily able to register my app to remove the warning on the login page, but they offer no support of how to actually ’sign’ the request to keep them secure.

I have posted to both the Blogger Data API Group and the Google Accounts API Group but it seems like I am dealing with some kind of ‘dark art’.

I think it’s a good idea to make connection for secure for people, but they are about to ‘force’ their bloggers to the new system, yet offer no support on how application developers like myself are to support this new ’secureness’.

Even the Zend GData framework, which is available does not appear to handle the secure method required. I also cannot use this without upgrading my PHP and installing some more stuff. But there is no need, as PHP and Curl can do the job required just fine.

For those who may be able to help, here are the docs for the signing I am on about. But there’s just not enough info there on how to do it.

When I get this working, I’ll be happy to share how I did it.

Anyone got any ideas? I have the insecure method working fine.

Argh!


Nov 1 2006

Google is Weird

One thing that makes me chuckle in an odd way about Google is how, on a Google search for ‘bloghud’ it rates the homepage of a user called Oliver Gasser higher in relevance than mine, Koz Farina. Heheh. Top job, Oliver! :) That dude has some serious SEO chops!!


Sep 14 2006

Google Ad(makesno)Sense?

Recently, I decided to it was high time I had a look at Google AdSense. Having never placed advertising on a website before, it was kind of weird, but the Google interface and instructions were very easy to follow.

I have put it on my Second Life blogging system pages at bloghud.com

But, while looking over their system today, I decided to have a look at their AdSense policies page and was rather surprised to see this entry:

“Copyrighted Material

In order to avoid associations with copyright claims, website publishers may not display Google ads on web pages with MP3, Video, News Groups, and Image Results.”

Whaaaa? I’m pretty sure I have seen loads of sites for AV with Google ads on them.

Does anyone out there know more about this? Have I misread it, or are all these people breaking the policy?


    LOADING PHREADZ »

    Recently on Flickr...

  • RSS My Recent Phreadz