Facebook Platform Dialogs Now Auto-Optimize For a User’s Device
Facebook has released a new version of its Platform Dialogs — interfaces which allow users to take actions through Facebook apps, websites, and mobile apps without giving special permissions. The updated versions automatically render in a format optimized for whatever device a user is on. The update ensures dialogs always look right without application developers having to deduce the appropriate display parameter to include.

The update currently only supports the Feed Dialog for publishing stories, Friend Dialog for adding friends, and the OAuth Dialog for authorizing users, but other dialogs will be updated in the future.
The new dialogs will make it easier for developers to create mobile apps that display well on the touch screens on newer devices as well as WAP browsers of older phones. It will aid international growth of mobile apps, as users from the developing world predominantly access Facebook through WAP browsers.
Facebook has been improving its mobile platform in other ways as well. Last month it introduced new location APIs, and single sign on, which allows Facebook-integrated mobile apps to borrow the authentication token from a device’s native Facebook app, relieving users from having to enter their Facebook credentials for each app they use.
New Platform Dialog Implementation
To invoke the dialog, applications send an HTTP request or use the JavaScript, iOS, or Android SDK.
For example, a dialog invoked through the JavaScript SDK would look as a follows:
<html>
<body>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script>
// assume we are already logged in
FB.init({appId: '123050457758183', xfbml: true, cookie: true});
FB.ui({
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg'
});
</script>
</body>
</html>
This would load the URL below as an frame:
http://www.facebook.com/dialog/feed?
app_id=123050457758183&
name=Facebook%20Dialogs&
link=http://developers.facebook.com/docs/reference/dialogs/&
picture=http://fbrell.com/f8.jpg&
redirect_uri=http://www.example.com/response/
A user on the iPhone mobile browser would see the following dialog for posting to their wall through the app:















December 10th, 2010 at 12:28 am
[...] Facebook har uppdaterat sitt api och gjort det möjligt för användare att integrera sig med appen utan att behöva ge behörighet. Dom nya dialogerna är dessutom optimerade, beroende på vilken platform användaren använder så kommer dialogboxen vara optimerad efter platformen. Läs mer här [...]