Android Facebook Dialog

I have integrated Facebook into my app. However, instead of bringing it up in a dialog, it opens full screen. I was wondering if anyone would know of a way to change this to dialog.

FaceBook Handler Class:

public void onCreate(Bundle savedInstanceState) {

     * Get existing access_token if any
    mPrefs = getPreferences(MODE_PRIVATE);
    String access_token = mPrefs.getString("access_token", null);
    long expires = mPrefs.getLong("access_expires", 0);

    if(access_token != null) 

    if(expires != 0) 

    if (facebook.isSessionValid()) 

    else {
      facebook.authorize(this, new String[] {"publish_stream"}, new Facebook.DialogListener() {

        public void onFacebookError(FacebookError e) {
            Toast.makeText(FacebookConnector.this, "Facebook error: " + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();

        public void onError(DialogError e) {
            Toast.makeText(FacebookConnector.this, "Facebook dialog error: " + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();

        public void onComplete(Bundle values) {
            Toast.makeText(FacebookConnector.this, "Thank You For Sharing!", Toast.LENGTH_SHORT).show(); }

        public void onCancel() {Toast.makeText(FacebookConnector.this, "Facebook authorization cancelled.", Toast.LENGTH_LONG).show();

private void postFacebookMessage() {

  AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook);
  Bundle params = new Bundle();
  params.putString("message", MSG);
  params.putString("picture", "");
  mAsyncRunner.request("me/feed", params, "POST", new FacebookPostListener(), null); }    

public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    facebook.authorizeCallback(requestCode, resultCode, data);

The code above produces the following result:

I would like it to be a dialog that the facebook window opens into. I have achieved this with my Twitter code:


Call authorization with additional parameter Facebook.FORCE_DIALOG_AUTH, like this:

facebook.authorize(this, new String[] {"publish_stream"}, Facebook.FORCE_DIALOG_AUTH, new Facebook.DialogListener() { ... });

Need Your Help

How can I modify sign-in page in Meteor Accounts-Entry package

html meteor accounts

how can I find the html and css files for the Meteor Accounts-Entry, specifically the sign-in page, so I can modify the way it looks?

install CPAN module ClearCase::CtCmd

perl cpan

I need to install the CPAN module ClearCase::CtCmd. I have downloaded the module CtCmd-1.09. After running the command perl Makefile.PL I am having the following errors:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.