Posts from the ‘Microsoft’ Category

How To Fix TweetSharp After Recent Twitter Changes

Three days ago, I was contacted by a Tile Me! user telling me that the Twitter integration in the app did not work for him. I checked on my phone, everything was fine. I could also see other people were using it just fine too. So, I gave the default instructions of “Have you tried reinstalling the app?"’ which did not help 😦 .

Yesterday, I gave the user an account name and password that I control for app testing, just to see if the problem is with the app or the account he is trying to log in with. Lo and behold it works, while his accounts (yes he created several) don’t. That doesn’t make sense, does it?

After this, I decided to create a new Twitter account myself and test with that. Of course it does not work. I got in touch with Robert Shurbet and Sébastien Lachance who are both using TweetSharp in their apps. Robert said that he encountered this error before and he coded the authentication with a RestClient himself, while Sébastien was not aware of this issue which caused his app to crash altogether. The guy user that first reported this problem had created his Twitter account in February 2014. So, this problem might have been there for a while.

If you are using TweetSharp 2.3.0 (which is the stable version) or a modified 2.3.1, try creating a new Twitter account and see if you can log-in with it. If you can’t, read on.

The Problem

I noticed that the problem was with the access tokens. For some reason, TweetSharp  was returning a ‘null’ access token when I logged in with a newly created Twitter account. I examined the TwitterResponse object which at first glance seemed fine. The status said ‘OK’. But, clearly it was not OK. After digging some more, I found out that an inner exception had occurred during the processing of the access token and was logged in the TwitterResponse object.

The exception that was logged said something along the lines of “Value assigned is greater than Int32’. I thought that must be it. They probably changed the type of something from’ ‘int’ to ‘long’. To investigate further, I had to download the TweetSharp 2.3.0 source code.

Now that I could access the TweetSharp classes, I found out that the culprit was the ‘UserId’ in the OAuthAccessToken class.

The Solution

The solution was quite simple. Change the ‘UserId’ type from ‘int’ to ‘long’ and find what else I broke by doing that. After building the project, I got a few errors at a few lines in the TwitterService.OAuth.cs class where the ‘UserId’ property was used.

In order to fix the errors all I had to do was replace all the occurrences of:

UserId = Convert.ToInt32(query["user_id"] ?? "0"),



UserId = Convert.ToInt64(query["user_id"] ?? "0"),


I built the project, replaced the .DLL that I was using from nuget with the newly compiled one, and voila everything was fixed. I also sent the .DLL to Sébastien which reported that the problem was fixed in his app as well.

If you want to edit the things yourself, download the source code and do the changes above. If you are lazy to do that, don’t worry, you can download the Windows Phone 8 .DLL I compiled from here. If you installed TweetSharp from nuget, just navigate to your project directory –> Packages –> TweetSharp.2.3.0 –> lib –> sl4-wp and replace TweetSharp.WindowsPhone.dll 

If you are using TweetSharp for WP7 or another platform, you’ll have to do the changes yourself (it’s the same ones).

Note: The developer has stopped supporting TweetSharp, so if you are creating a new app, use another alternative instead. I cannot guarantee that TweetSharp won’t break again anytime soon.  I heard Linq2Twitter is currently popular among developers.


Promote Your Windows Phone Apps With Device Shot

Few months ago, when I added a Twitter Background creator to Tile Me! I got this idea to create an app that would quickly generate in-device shots from your images. At that time, I thought it could be used by ordinary Windows Phone users to share their home screens. But, after talking to Robert Shurbet (the developer of #Hashtastic who I collaborated with to add the Avatar Gallery feature) I realized this kind of app would be great for developers to promote their apps on social networks too.

About two weeks ago I started implementing the idea and had a closed beta with few other developers who really contributed with the design choices. I’d like to thank Sébastien Lachance, Robert Shurbet, Hermit Dave and Mark Tepper. Special shout out to my brother Alpay for all the phone renders he managed to find and edit on the interwebs, the app wouldn’t exist without him.

Device Shot went live two days ago and was well received by many Windows Phone users. WPCentral published an article too! Along with App Promo by Sébastien Lachance, I believe they are currently the two best apps for developers to promote their own apps. On the left you can see an image generated with Device Shot for Rob Irving’s Car Dash.

I already submitted an update which is under certification to add support for Landscape images/screenshots too.

You can get Device Shot by scanning the QR code below. The trial version let’s you save up to 3 images. To remove that limitation you can purchase it for $0.99.



OneSky–A Great Translation Service For Localizing Your Apps

I have noticed a few times now under the #wpdev hashtag, some developers are asking for the best method for translating apps. I’ve seen some devs are uploading an Excel file to SkyDrive OneDrive, and give a link to the people who are willing to translate. This is definitely not a bad approach, but I think OneSky is much better. A fellow developer from Portugal told me about this free service, so here’s a shout out to Diogo Cardoso.

Note: This service is not Windows Phone specific. It can be used for Android, iOS etc. Supports a lot of formats (.resx, .xml, .xls etc.)

Why You Should Localize Your App

If your native language is English and you don’t speak any other language, how would you feel if there was some awesome app that is very popular in Brazil but it only supports Portuguese? Of course you won’t be happy. Our main goal as app developers is to make people happy and provide quality apps (*cough* and earn some money of course).

You should make the effort and translate your app into at least 2 of the following languages: Portuguese (Brazil is a huge Windows Phone market), Spanish (you cover Spain and most of South America), French (France, Canada, also big markets) and German. If you can also support Chinese, Russian and Hindi, that would be even better.

After I added more languages to Tile Me!, the coverage from international Windows Phone sites increased drastically.

Why OneSky?

  • It is completely free if you want to crowdsource your translations!
  • Online editor that works on most browsers. I even had a translator that translated Tile Me! into German on his Windows Phone.
  • You can give a link to your OneSky site where people can Request to Contribute to a language of their choice. You then approve or reject that request.
  • Upload non-translated .resx files and download the finished translations in .resx format.
  • Specify maximum length of words. For example, if the words are too long for the App Bar icons, they will not be fully shown. You can specify the character length of a translation so the translator can try to find a shorter synonym which won’t mess up the UI.
  • Notifies the translator if spaces are missing.
  • When you prepare a new update where you remove some strings and add others in your .resx file, you can upload the new .resx and OneSky detects the same strings, removes the ones you have removed, adds new ones that you have added, but does not touch the ones (along with their translations) that you haven’t changed.
  • If you update a string in a new update, the translators can filter by ‘Outdated words’ and see what you have changed so they can update the translation for that line.
  • Your translators receive an email every time you add new words for translation.
  • Voting, commenting, reviewing, moderating and other features for organizing your translators and workflow.

Quick Start Guide

Go to and create a new Free account. Once you’ve done that, on the top go to Projects –> Create Project. On the next page, choose Mobile Apps / Games.

Select Crowdsource under translation method, choose your platform (Windows Metro App is fine for Windows Phone apps), select your base language and enter your app name.

Next, drag and drop your AppResources.resx file. Click Continue and select the languages you want to translate to.

And you’re done. Now you can invite collaborators to contribute to each language, or on the top go to Collaboration –> Collaboration Site and share that link on Twitter, Facebook etc. From that link, people can request to translate your app. You can also add that link somewhere inside your app.

Then, from the project page you can track the number of translated words, remaining words etc. Once a translation is completed you can download the file as shown on the screenshot below:

And that concludes my brief quick start guide. I strongly advise to check the knowledge base if you need some more info about a specific feature. Feel free to leave a comment below if you get stuck somewhere.


Join The Me Tile Nation Now!

I spent the last two days working on a video commercial for Tile Me! I’d like to thank my brother for helping out with the editing and also everyone else that took part in the ad. Enjoy!

Tile Me!–1 Month After Release

Well that was… unexpected. What started as a 2 day weekend project which I thought MIGHT be downloaded by some die-hard Windows Phone fans and never expected to go over 1,000 in the first month, ended up being downloaded by over 35,000 people in just 1 month (1st of August – 1st of September).

It all started with the first article on WPCentral (there are a total of 4). The app got downloaded over 2,000 times in just 24 hours. I got a lot of great feedback, my twitter timeline was exploding with Me tiles as avatars. The most requested three features were custom text, high quality PNG support, and animated GIF support.

I immediately started working on the custom text feature which was very easy to implement and the first update was live just few days after the release of the first version. I then started looking into GIF, but since it was going to take me longer to figure that out, I decided to go with PNG support. To add PNG I also had to add SkyDrive integration which was well received by the users. With the release of that update, WPCentral published another Tile Me! article. Again, new reviews started popping up and people liked the new update, but the important thing here is that people liked that I was constantly communicating with them (on comments sections on the websites the app was featured, Twitter, Email etc.), listening to their feedback and adding new features almost every week. So, a Protip: Listen and communicate with your audience.

The SkyDrive integration was quite easy and straightforward with async/await for Windows Phone 8. On Windows Phone 7 on the other hand, I could not reuse any of the WP8 code, so I had to do it with events, which was a bit annoying.

After PNG, it was time for the hard stuff… animated GIF. It took me several days, and I was almost giving up on it, but I eventually managed to figure it out. Once I finished implementing it on WP8, I started working on porting it to WP7, but since that was going to take several days to finish (most of the code was not reusable 😦 ) I decided to publish a new update just for the WP8 users.


Boom another article from WPCentral and with that, the official Nokia US twitter profile tweets about Tile Me! Achievement unlocked I guess :). What happens next? A WPCentral reader posts a loophole that allows animated GIFs on Twitter. This results in the fourth WPCentral article! A lot of people used the tutorial to animate their Twitter avatars, which gave my Twitter timeline a great Windows Phone vibe. Unfortunately, Twitter closed the loophole two days after the WPCentral article and posting new GIF avatars is no longer possible *sad panda*.

Today, Nokia Conversations, and official Nokia page, wrote an article about Tile Me! (thanks guys) and that should help in spreading the word even more about the app. I currently have a beta test with few people, which are the greatest Tile Me! fans. The new version will add Twitter integration, so the users will be able to upload their Me tiles as Twitter avatars within the app.

The app was also featured by several other pages like WMPoweruser, GSM.MK, WindowsQuebec etc. I would also like to thank WinPhanDev for doing a short interview with me.

Thanks for reading. Until next time!

* Image created by Sean “TheWinPhan” Johnson.