Blog > January 2012

OK, so I’ve had my Windows Phone 7.5 for 50 days now and although I got bored of blogging about it after a fortnight, I don’t think that reflects badly on the phone… how much can anyone REALLY write about a phone?

Anyway, it’s fair to say that I’ve not had any particularly bad experiences with my Windows Phone, and I’m still very pleased with the device.

Since my last post about my Windows Phone, I’ve found some great features, and found some disappointment with the manufacturer, but that’s not Microsoft’s fault.

So anyway the highs, I discovered a number of useful apps like Cardmobili. and Xbox Companion which lets me control my Xbox 360 from my handset. I’m more involved in what’s going on with my family on social networks on a daily basis, and I’m more on top of my e-mails than ever.

Tonight, I found some nice features that I felt worth blogging about. Recently my wife was involved in an RTA in our car (not her fault, and she wasn’t injured) but whilst the car’s at the body shop being repaired, they’ve given us a hire car… a ‘10 reg Megane with loads of extras.

I was pleased to see the compatibility with my Dell Venue Pro. A real bonus for business users/regular travellers. From pairing (which was easy). It offered to sync my phone book, and even share the pictures on my device. I found that it instantly knows when it’s connected to the bluetooth, and when I receive a text message it announces it over the car’s handsfree system, and allows me to voice command it to read it outloud, and even reply by voice. This is amazing.

As you might expect it allows me to play Spotify over bluetooth, via the car speakers too which makes for great music and no dodgy signal as you move between broadcasting regions.

The best part of all this, is that “it just works” – and anyone who knows me will know that I like systems (software, hardware, or both) that “just work” without requiring any technical knowledge or any great deal of work from the user. My Windows Phone and the in car sat nav/audio system in the Renault Megane fit nicely into this category.

Has anyone had this level of experience with other platforms? Voice command text messaging and everything? I know BlackBerry has ‘an app for that’ but does anything else have this functionality built in?

Posted: 31/01/2012 21:01:54 by Kurt Farrar | with 1 comments


This week we’re creating our first Facebook application for one of our clients.

It sounds fairly reasonable to want to include the latest posts from your wall from your Facebook page on your own website, and until recently, that was something that was fairly easy to do as walls and pages had the option to “Get updates via RSS” which would give you an RSS feed that you can subscribe to.

That changed when Facebook introduced the Graph API and they have seemingly been phasing out the RSS feed since to the point that when you click the link on a page where it’s been disabled you’ll get a message instead saying that the service has been disabled.

This seems to make sense, as the Graph API is much more privacy conscious and this therefore prevents people’s wall posts if they’re not friends with sufficient rights, but just seems a pain for pages, which in my opinion are meant to be public.

Anyway, we’ve struggled through the process of creating our app, specifically with C# and ASP.NET to do something seemingly simple, so I thought it worth sharing for others, how you can do this here so that everyone else can benefit too. There are plenty of guides on how to access Facebook using PHP, Ruby, Python, and pretty much everything

Firstly, you need to include Facebook C# SDK in your project, if you’re using NuGet you can search ‘Facebook’ and you’ll find it quite easily, or run:

PM> Install-Package Facebook -Version 5.4.1.0

Otherwise it’s available on codeplex here:
facebooksdk.codeplex.com

OK, once you’ve got it installed, and (I recommend) before you start writing any code there’s a few things that you need to do (and I think this information is what I’ve struggled the most to find – maybe it’s just me).

Disclaimer: What I’ve done here may not be the correct approach, but it works, and seems the easiest for me to understand and implement. Some other approaches require users to authenticate with facebook first which is not the desired result.

 

Create a new app

Visit:

http://developer.facebook.com/apps

This is the area for developers that allows you to manage any apps that you’ve created. You need to create a new one, this will give you some API keys etc. but ultimately allow you to create an “access_token”. This is the magic code that you need to be able to read wall posts.

Create access token

Once you’ve created your new application, you’ll need to navigate to the Graph API Explorer. There are a number of ways to reach this, the first is a ‘Useful link’ that appears when you’re editing your applications settings on the previous page, or you can find it from the developer tools. Both of these links seem buried away to me, so here’s a quick link for you:

https://developers.facebook.com/tools/explorer

When you visit the page, you’ll see a test harness that lets you see the results when you can various parts of the Graph API. We’ll make proper use of this in a little while, but firstly, change the application from the drop down list in the top right hand corner to the one you just created.

You’ll notice that Access Token is blank (or if you’ve had problems previously, it may have a value which doesn’t have the right permissions).

Click the button to “Get Access Token”. You’ll see a dialog appear of which you need to select the following permissions:

From “User Data Permissions”:

  • user_status
    This allows your application, using the access token, to read from yours and other people’s walls as if it were you, so it can access all walls that you have access to.

From “Extended Permissions”:

  • offline_access
    This allows your application to continue working even after you have logged out. In an early attempt of these, we got everything working without this permission, then after signing out of facebook and coming back to our code, we found that the access_token had expired.

Click “Get access token” and you’ll see the access token text box populated with your access token.

You’re supposedly able to do this from the Facebook C# SDK, but I couldn’t see any examples that didn’t involve user authentication in your website to do this, so I’ll say there’s an area for improvement here. Once you have the instructions above, I think this is quite quick and easy to do manually without the need to write code, so that’s my advice.

This approach allows the application that you’ve created to run as ‘you’, with access to ‘your’ wall. If you’re conscious about anyone that isn’t a friend potentially seeing the contents of your personal wall, you may want to create a new facebook account, exclusively for this purpose. In principle, as long as the user that you’re logged in as, when you generate the access token, can read from the wall that you want to display posts from, then you’ll be able to read them from your application.

Put the access token somewhere for reference, your web.config for example, and then we’re ready to start writing some code.

Graph API

The Graph API, allows you t o do anything you want/need with Facebook via a structured URL. the response containing a JSON object(s).

You can use the Graph API Explorer to try various commands and view the output, in the context of your application and the permissions that you defined when you generated your access token.

You can find a comprehensive listing of methods that you can call in the Graph API documentation on the Facebook Developer portal.

For the purpose of reading wall posts, we’re going to use the format  /{user_or_id}/feed. For example, the path for mydigitalmedia’s wall on our page would be /mydigitalmediaonline/feed.

You can try entering that path into the Graph API Explorer to view the results.

Extract posts

To extract the posts for a particular wall, you can use the following few lines of code:

Facebook.Web.FacebookWebClient client = new Facebook.Web.FacebookWebClient(ConfigurationManager.AppSettings["app_token"].ToString());

//Get wall posts
var result = (IDictionary<string, object>)client.Get(ConfigurationManager.AppSettings["page_id"].ToString() + "/feed");

var posts = result.Values.First();

If you’ve not used NuGet to include Facebook in your project, you’ll need to add a reference to the Facebook.dll as well.

The above will populate posts with a dictionary of posts, each consisting of a JSON string. From here, you simply need to parse the text however you like. I’m not going to blog about this here, as I think it’s a different topic (which I may cover separately another time), but some tips may be to use a JSONSerialiser to deserialise the script into objects, which is included through the Facebook SDK, though you can also use a javascript serialiser to do the same thing, as ultimately, JSON is javascript

Hopefully this post will be some help to others, and can save you the time it’s taken me in research finding how to access Facebook and the use the Graph API from C# and ASP.NET.

If you have any comments, or suggestions on how to do this better, please share them below for everyone’s benefit.

Posted: 16/01/2012 14:23:22 by Kurt Farrar | with 1 comments


A few days ago I had a problem with one of the websites I was building where OBJ (with a dashed box around it) was displayed as a character in the body of my content.

This didn't show on the Mac under OSX, but was picked up during cross-browser testing on Windows 7 running Internet Explorer 9.

I checked the HTML from my Mac and there was nothing erroneous there, so I tried a Google search to see if anyone else had encountered this... At this point thinking I'd done something funky with my HTML.

I was surprised to find that my Google search was bringing up nothing relevant, instead bringing up posts about object embedding with flash, not what I was doing or encountering.

So I decided to log into Kentico CMS from Windows/IE. Fortunately, Kentico showed the same thing in the editor view, which turned out to be some characters that aren't visible under OSX, so I was able to delete these, save, and problem solved.

Where did these come from? My client provided their content in a PDF for extracting and using on the site as appropriate. I can only conclude that by copying the content, I was also copying some characters that weren't visible and they were being pasted into the page.

It goes to show that as web designers and web developers, cross platform/cross browser testing is invaluable as part of your quality assurance process to make sure that the website is suitable for use by your visitors.

Has anyone else encountered this before? What do you use/do for cross browser testing?

Posted: 13/01/2012 08:54:53 by Kurt Farrar | with 1 comments


My Mac when I bought it 3+ years ago was running OSX Leopard. During that time it's withstood 2 upgrades, the first to OSX Snow Leopard, and more recently to OSX Lion and it's still been going strong.

Although during that period, I've bought a new iMac for my more power hungry computing, benefiting from a more powerful graphics card, more storage, RAM and a nice big display, my MacBook in reality still gets used the more often. 

Throughout the 3 years, it's been used every morning and evening commute, and every evening and weekend. The batter life is still standing up, but over the last 6 months or so I've noticed it start to slow down a little, and I've been running low on free disk space. 

To attempt to deal with this I've bought a utility called CleanMyMac (from MacPaw). It's actually a really good utility, freeing up 79GB of space at my last count, and although my Mac did seem to speed up for a while, and have some more free space, I couldn't help thinking that after removing absolutely everything that I didn't need I was left with only 42GB of free space on a 150GB disk. So I thought it's time for a wipe and re-install. As I'm an ASP.NET developer, my development takes place on Windows (which I normally run in a VM on my iMac), so I thought it a good opportunity to install Windows 7 using Boot Camp. I pulled my original OSX Leopard disks out of the cupboard, blew the dusk off and expected to have to install from them. The instructions said to boot with the option key held to boot from the DVD, only when I did this I noticed a 'Recovery HD' partition. It's worth pointing out at this point that I've dual-booted my MacBook with Windows 7 before, so it was somewhat a surprise to see this partition as it wasn't there in the past. 

Anyway, curiosity and all that, I had to boot from this new Recovery HD partition. And a good job I did... it turns out that OSX Lion (as it's a downloadable upgrade) creates the partition and puts the necessary software there to be able to restore your computer in the event of a failure etc. Neat. Unfortunately, it does require that I download the entire OS installation all over again. So about 4 hours later and I had a nice clean install of OSX Lion on my MacBook and it was running as fast as the day I bought it. 

Now to install Windows 7... went with a few hiccups installing the BootCamp software/drivers within Windows 7 after I'd done the initial install, but nothing I couldn't get around. 

I started this on Saturday, and by Sunday evening, I had pretty much all of the software that I own, in both Windows 7 and OSX re-installed on my computer. After installing some updated for Windows 7, I shut-down to boot into OSX when it comes back on with a BEEP-BEEP-BEEP! BEEP-BEEP-BEEP! with the hard-drive light flashing in time with it. 

What could have happened to my Mac now? Unfortunately as it wouldn't boot, I couldn't jump on the internet to find the problem so easily. So, using an alternative device (in this case, my trusty Windows Phone 7 - had to get that in there!), I find that the problem is likely to be with some new RAM that I've installed... only I haven't installed any new RAM. I have been wanting to up the RAM in this thing from 2GB to 4GB (the max it'll take) for some time, but I got the new iMac instead of a cheap RAM upgrade. 

So anyway, for the first time since I got it, I took my MacBook apart. Battery cover off, battery out, hard disk out, bottom of the case off, and finally released both sticks of RAM. Both looked absolutely fine, so I tried putting one back in at a time and booting up... with 1 stick in, it powered on without the dreaded BEEP! I'd been hearing, so I put the second stick in, and tried again. BEEP-BEEP-BEEP! Argh! 

On the upside, the online posts in the Apple discussion forums were bang on, it was the RAM. Just so frustrated that it's encountered a problem without having had a jolt or anything of the sort. I've tried reseating it a number of times without any improvement. Oh well. 

After putting the MacBook back together, with only 1 stick of RAM in it, I've powered it up, and here I am now, writing from my ever so trusty MacBook. 

Pleasantly, my MacBook is still running faster than it was prior to be wiping it and reinstalling OSX Lion, so what's the point of upgrading you may be thinking. Well, as a web designer and web developer... a large portion of my work takes place in Adobe Fireworks, and Microsoft Visual Studio 2010. And running both of these separately tends to hog a fair amount of RAM. I don't think I'd have a pleasant experience running them with only 1GB though for the next few days while I wait for my RAM upgrade to arrive, I'll no doubt find out. 

I'm also quite pleased that the laptop has lasted me so long without any hardware problems. It comes with me everywhere, and I've never owned any other computer for so long. Usually I find that they don't perform as well as I expect, or encounter some sort of hardware problem. Even the best of laptops that I've owned (my Sony VAIO TR1MP) encountered a major hardware failure, and after waiting nearly 6 months for replacement parts from Sony, resulted in them giving me a full refund. I think the longest I've ever owned a computer (whether desktop or laptop) prior to this must have been 12 months, and I think that was a little Dell Studio computer that we used as our Windows Media Center powered home entertainment system - which to this day is still running fine (as far as I know) at my sister-in-law and her boyfriend's house as their primary PC. 

Anyone else had this particular problem? How long have you had the hardware on a computer that you're using a lot last you?
Posted: 08/01/2012 23:16:56 by Kurt Farrar | with 0 comments


MyDigitalMedia's online blog covering topics from technology and the internet, to marketing and ways to run your business more efficiently.

Our blog is lead by whatever our current experiences and projects happen to be, but if you have any particular subjects that you'd like to see here, please get in touch blog@mydigitalmedia.co.uk

Our online blog covers a wide range of subjects including:
  • Internet
  • Web design
  • Web development
  • Latest devices
  • Online services
  • Technology trends
  • Brand
  • Marketing
  • Photography
  • Business automation
  • Cutting overheads
If there is anything in particular that you'd like to see on our blog, please get in touch blog@mydigitalmedia.co.uk

Recent posts

BidSketch - A Review

An overall smarter way to generate your proposals consistently, quickly and easily.  Gives even the simplest proposal a polished and professional look and feel. Requires no technical knowledge whatsoever suiting Business Development Managers in any industry including non-IT businesses. Read our review of BidSketch.com. 



Google AdWords and Ad Performance
One of our client's asked us this week all about how they can achieve a better position within the sponsored search results for Google AdWords. We put together some rather lengthy advice and then...

Blogging to Kentico website using Word 2013 preview
Many of you may have used and experienced the benefits of Windows Live Writer, and it's a fantastic blogging tool, second to none in my opinion, and as soon as the rumours of the Windows Live brand...

Promote for £4? What’s this all about?
This week, we’ve had a number of our customers that rely heavily on Facebook for the promotion of their business as part of their marketing strategy contact us asking what the ‘Promote’ option that...

The value of effective marketing
Whilst reading the Metro on my daily commute this morning I was reading how Disney's latest film to hit the cinema (John Carter) is set to be the biggest flop of the year, with the estimated loss...

Syndication

RSS
MyDigitalMedia are a small business IT consultancy specialising in web design, and web development creating high quality bespoke web solutions, and establishing our client's brands online, without a hefty price tag. Based in Widnes, Cheshire we cover all surround areas including St. Helens, Liverpool, Warrington, and Runcorn and have a number of national clients from throughout North Wales, and as far as Plymouth. Thanks to the internet, and online conferencing, we're never too far away. View our portfolio to view examples or projects that we have undertaken to date.