Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
  • Games
  • Media
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • Web
  • Technology Partners
  • Methods
    • API Requests
    • Async API Requests
    • Authentication
    • Dialogs
    • Helpers
  • Interfaces
    • -
    • DialogListener
  • Errors
    • DialogError
    • FacebookError

Dialogs

The dialog methods used in the Facebook Android SDK. These are defined in Facebook.java

You implement these methods to generate a Facebook Platform dialog.


void dialog(Context context, String action, DialogListener listener):

Generate a Facebook UI dialog for the request action in the given Android context.

Parameters

context - The Android context in which we will generate this dialog.

action - The type of dialog to call. Currently supported methods are feed, apprequests and oauth.

listener - Callback interface to notify the application when the dialog has completed.

Return Value

None, the callback interface will be notified when the request has completed.

Note

This method is asynchronous and the callback will be invoked in the original calling thread (not in a background thread).


void dialog(Context context, String action, Bundle parameters, DialogListener listener):

Generate a Facebook UI dialog for the request action in the given Android context.

Parameters

context - The Android context in which we will generate this dialog.

action - The type of dialog to call. Currently supported methods are feed, apprequests and oauth.

parameters - String key-value pairs to be passed as URL parameters. E.g. for posting to a friend's wall, "to":"friends_uid" :

    Bundle params = new Bundle();
    params.putString("to", String.valueOf());
    mFacebook.dialog(, "feed", params, );

listener - Callback interface to notify the application when the dialog has completed.

Return Value

None, the callback interface will be notified when the request has completed.

Note

This method is asynchronous and the callback will be invoked in the original calling thread (not in a background thread).

Updated about 10 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy