Facebook doesn't like windows phone

Facebook doesn't like windows phone

While I did the last change of my new application (9gag), I discover a big problem with facebook API and Windows Phone.

If you create a new Facebook application and use it in your windows phone application (using the facebook sdk library for example), you will be surprised to see the following message when try to sign in :
An error has occured with 9gag. Try later.
API Error Code: 11
API Error Description: This method is deprecated
Error Message: Display=wap dialogs have been deprecated. You can temporarily enable them by disabling the “july_2012” migration. Thery will stop working permanently on July 1, 2012

Two comments :

  • I don’t use the display mode “wap”, I use “touch” in my code
  • Why do i need to disable a future update now ?
In fact the update is still here, “july 2012” it’s in fact the date where old application will be forced to use the new api. If you create a new facebook application, you use already the new api.

If we analyze the changelog, we can see that the “wap” display mode will be stopped, it should not be any problem with my application cause I explicitly asked the display mode “touch”, but that’s when I realized that facebook is not cool with windows phone :

Facebook refuses to display facebook pages with display “touch” with IE9 (mobile or desktop) and it replaces them with the display “wap”.

So, to cut a long story short: new applications must use the new api without the display mode “wap” and if you try to display the touch mode with windows phone, Facebook will use the  forgiven display mode “wap” (and display an error)

Solution

It is not possible to a new application to use the old API so, the only solution is to use a display mode different than wap and touch, so we haven’t a large choice : popup and page… two modes for desktop not for mobiles…, but we don’t have the choice.

So if you use facebook SDK, do not forget to use:

parameters[“display”] = “popup”;

instead of

parameters[“display”] = “touch”;

And if it works for me now?

If your application has at least a few weeks, yes, you don’t have this problem, because facebook migrates you in July 2012.

An option is normally visible in your interface “developers.facebook.com” in the “Advanced” tab :

This means that on July 1, you also get surprised with the above error message  if facebook do nothing…

Comments are closed.