Facebook Login Button Vs. OAuth Dialog

ma11hew28 picture ma11hew28 · Feb 13, 2011 · Viewed 24.8k times · Source

What's better?

  1. Login Button

  2. OAuth Dialog

I like the Login Button because it shows profile pictures of the user's friends who have already signed up for your application and it opens a dialog overlay instead redirecting to a new page as does the OAuth Dialog.

But, I think the OAuth Dialog is newer. Which should we use?

Also, the Login Button is XFBML. Apparently, Facebook is in the process of deprecating FBML. Does that mean XFBML is being deprecated too?

Answer

Daniel Schaffer picture Daniel Schaffer · Feb 13, 2011

It isn't that one is better than the other - they are intended to accomplish different things.

The login button is used for external websites to allow Facebook-based social elements and community within that site. You can then add other plugins such as comments, the like button or the face pile to further integrate the Facebook social networking aspects, with the login button acting as the authentication mechanism.

The OAuth dialog is specifically for FB apps that run within the Facebook canvas, and allows you to request Graph API permissions from a user which will grant you access to various parts of their profile and additional channels of communication.

While Facebook is deprecating FBML, they are not including XFBML elements that support social plugins, such as the login button. See here for more info.