com.facebook.widget
Class WebDialog.FeedDialogBuilder

java.lang.Object
  extended by com.facebook.widget.WebDialog.FeedDialogBuilder
Enclosing class:
WebDialog

public static class WebDialog.FeedDialogBuilder
extends Object

Provides a builder that allows construction of the parameters for showing the Feed Dialog (https://developers.facebook.com/docs/reference/dialogs/feed/).


Constructor Summary
WebDialog.FeedDialogBuilder(Context context, Session session)
          Constructor.
WebDialog.FeedDialogBuilder(Context context, Session session, Bundle parameters)
          Constructor.
 
Method Summary
 WebDialog.FeedDialogBuilder setCaption(String caption)
          Sets the caption to be displayed.
 WebDialog.FeedDialogBuilder setDescription(String description)
          Sets the description to be displayed.
 WebDialog.FeedDialogBuilder setFrom(String id)
          Sets the ID of the profile that is posting to Facebook.
 WebDialog.FeedDialogBuilder setLink(String link)
          Sets the URL of a link to be shared.
 WebDialog.FeedDialogBuilder setName(String name)
          Sets the name of the item being shared.
 WebDialog.FeedDialogBuilder setPicture(String picture)
          Sets the URL of a picture to be shared.
 WebDialog.FeedDialogBuilder setSource(String source)
          Sets the URL of a media file attached to this post.
 WebDialog.FeedDialogBuilder setTo(String id)
          Sets the ID of the profile that the story will be published to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDialog.FeedDialogBuilder

public WebDialog.FeedDialogBuilder(Context context,
                                   Session session)
Constructor.

Parameters:
context - the Context within which the dialog will be shown.
session - the Session representing an authenticating user to use for showing the dialog; must not be null, and must be opened.

WebDialog.FeedDialogBuilder

public WebDialog.FeedDialogBuilder(Context context,
                                   Session session,
                                   Bundle parameters)
Constructor.

Parameters:
context - the Context within which the dialog will be shown.
parameters - a Bundle containing parameters to pass as part of the dialog URL. No validation is done on these parameters; it is the caller's responsibility to ensure they are valid.
session - the Session representing an authenticating user to use for showing the dialog; must not be null, and must be opened.
Method Detail

setFrom

public WebDialog.FeedDialogBuilder setFrom(String id)
Sets the ID of the profile that is posting to Facebook. If none is specified, the default is "me". This profile must be either the authenticated user or a Page that the user is an administrator of.

Parameters:
id - Facebook ID of the profile to post from
Returns:
the builder

setTo

public WebDialog.FeedDialogBuilder setTo(String id)
Sets the ID of the profile that the story will be published to. If not specified, it will default to the same profile that the story is being published from.

Parameters:
id - Facebook ID of the profile to post to
Returns:
the builder

setLink

public WebDialog.FeedDialogBuilder setLink(String link)
Sets the URL of a link to be shared.

Parameters:
link - the URL
Returns:
the builder

setPicture

public WebDialog.FeedDialogBuilder setPicture(String picture)
Sets the URL of a picture to be shared.

Parameters:
picture - the URL of the picture
Returns:
the builder

setSource

public WebDialog.FeedDialogBuilder setSource(String source)
Sets the URL of a media file attached to this post. If this is set, any picture set via setPicture will be ignored.

Parameters:
source - the URL of the media file
Returns:
the builder

setName

public WebDialog.FeedDialogBuilder setName(String name)
Sets the name of the item being shared.

Parameters:
name - the name
Returns:
the builder

setCaption

public WebDialog.FeedDialogBuilder setCaption(String caption)
Sets the caption to be displayed.

Parameters:
caption - the caption
Returns:
the builder

setDescription

public WebDialog.FeedDialogBuilder setDescription(String description)
Sets the description to be displayed.

Parameters:
description - the description
Returns:
the builder