org.springframework.social.twitter.api
Class OEmbedOptions

java.lang.Object
  extended by org.springframework.social.twitter.api.OEmbedOptions

public class OEmbedOptions
extends Object


Constructor Summary
OEmbedOptions()
           
 
Method Summary
 OEmbedOptions align(String align)
          Specifies how the embedded tweet should be aligned.
 OEmbedOptions hideMedia()
          Specify that the embedded Tweet should not show images that were posted with the tweet.
 OEmbedOptions hideThread()
          Specify that the embedded Tweet should not show the original message if the tweet is a reply.
 OEmbedOptions language(String lang)
          Specifies the language code for the embedded tweet.
 OEmbedOptions maxWidth(int maxWidth)
          Specify the maximum width in pixels that the embedded tweet should be rendered at.
 OEmbedOptions omitScript()
          Specify that the embedded Tweet should not include a <script> element pointing to widgets.js.
 OEmbedOptions related(String related)
          Suggested Twitter accounts that might be related to the embedded tweet.
 MultiValueMap<String,String> toRequestParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OEmbedOptions

public OEmbedOptions()
Method Detail

maxWidth

public OEmbedOptions maxWidth(int maxWidth)
Specify the maximum width in pixels that the embedded tweet should be rendered at.

Parameters:
maxWidth - the maximum width. Must be between 250 and 550.

hideMedia

public OEmbedOptions hideMedia()
Specify that the embedded Tweet should not show images that were posted with the tweet. By default, images will be shown.


hideThread

public OEmbedOptions hideThread()
Specify that the embedded Tweet should not show the original message if the tweet is a reply. By default, the thread will be shown.


omitScript

public OEmbedOptions omitScript()
Specify that the embedded Tweet should not include a <script> element pointing to widgets.js. This avoids the script from being redundantly loaded in the case that 2 or more embedded tweets are rendered on a page. By default, the script will be included.


align

public OEmbedOptions align(String align)
Specifies how the embedded tweet should be aligned.

Parameters:
align - The alignment value. Either left, right, center, or none. Defaults to none.

related

public OEmbedOptions related(String related)
Suggested Twitter accounts that might be related to the embedded tweet. Used by Web Intents (https://dev.twitter.com/docs/intents) to render suggestions to the reader.

Parameters:
related - A comma-separated list of Twitter screen names to recommend.

language

public OEmbedOptions language(String lang)
Specifies the language code for the embedded tweet.

Parameters:
lang - The language code. Example: "fr"

toRequestParameters

public MultiValueMap<String,String> toRequestParameters()