Twitter.Profile Method

Generates an HTML form that displays a Twitter feed for the specified user name.

Namespace:  Microsoft.Web.Helpers
Assembly:  Microsoft.Web.Helpers (in Microsoft.Web.Helpers.dll)

Syntax

'Declaration
Public Shared Function Profile ( _
    twitterUserName As String, _
    width As Integer, _
    height As Integer, _
    backgroundShellColor As String, _
    shellColor As String, _
    tweetsBackgroundColor As String, _
    tweetsColor As String, _
    tweetsLinksColor As String, _
    numberOfTweets As Integer, _
    scrollBar As Boolean, _
    loop As Boolean, _
    live As Boolean, _
    hashTags As Boolean, _
    timestamp As Boolean, _
    avatars As Boolean, _
    behavior As String, _
    searchInterval As Integer _
) As HtmlString
'Usage
Dim twitterUserName As String
Dim width As Integer
Dim height As Integer
Dim backgroundShellColor As String
Dim shellColor As String
Dim tweetsBackgroundColor As String
Dim tweetsColor As String
Dim tweetsLinksColor As String
Dim numberOfTweets As Integer
Dim scrollBar As Boolean
Dim loop As Boolean
Dim live As Boolean
Dim hashTags As Boolean
Dim timestamp As Boolean
Dim avatars As Boolean
Dim behavior As String
Dim searchInterval As Integer
Dim returnValue As HtmlString

returnValue = Twitter.Profile(twitterUserName, _
    width, height, backgroundShellColor, _
    shellColor, tweetsBackgroundColor, _
    tweetsColor, tweetsLinksColor, numberOfTweets, _
    scrollBar, loop, live, hashTags, timestamp, _
    avatars, behavior, searchInterval)
public static HtmlString Profile(
    string twitterUserName,
    int width,
    int height,
    string backgroundShellColor,
    string shellColor,
    string tweetsBackgroundColor,
    string tweetsColor,
    string tweetsLinksColor,
    int numberOfTweets,
    bool scrollBar,
    bool loop,
    bool live,
    bool hashTags,
    bool timestamp,
    bool avatars,
    string behavior,
    int searchInterval
)
public:
static HtmlString^ Profile(
    String^ twitterUserName, 
    int width, 
    int height, 
    String^ backgroundShellColor, 
    String^ shellColor, 
    String^ tweetsBackgroundColor, 
    String^ tweetsColor, 
    String^ tweetsLinksColor, 
    int numberOfTweets, 
    bool scrollBar, 
    bool loop, 
    bool live, 
    bool hashTags, 
    bool timestamp, 
    bool avatars, 
    String^ behavior, 
    int searchInterval
)
public static function Profile(
    twitterUserName : String, 
    width : int, 
    height : int, 
    backgroundShellColor : String, 
    shellColor : String, 
    tweetsBackgroundColor : String, 
    tweetsColor : String, 
    tweetsLinksColor : String, 
    numberOfTweets : int, 
    scrollBar : boolean, 
    loop : boolean, 
    live : boolean, 
    hashTags : boolean, 
    timestamp : boolean, 
    avatars : boolean, 
    behavior : String, 
    searchInterval : int
) : HtmlString

Parameters

  • width
    Type: System.Int32
    (Optional) The width, in pixels, of the form . The default is 250.
  • height
    Type: System.Int32
    (Optional) The height, in pixels, of the form. The default is 300.
  • backgroundShellColor
    Type: System.String
    (Optional) The background color as a hexadecimal value for the outer shell of the form. The default value is #333333".
  • shellColor
    Type: System.String
    (Optional) The color as a hexadecimal value for the outer shell of the form. The default value is "#ffffff".
  • tweetsBackgroundColor
    Type: System.String
    (Optional) The background color as a hexadecimal value for the individual returned tweet items. The default value is #000000".
  • tweetsColor
    Type: System.String
    (Optional) The color as a hexadecimal value for Twitter posts. The default value is "#ffffff".
  • tweetsLinksColor
    Type: System.String
    (Optional) The color as a hexadecimal value for the links to Twitter posts. The default value is "# 4aed05".
  • numberOfTweets
    Type: System.Int32
    (Optional) The number of Twitter posts to show. The default is 4.
  • scrollBar
    Type: System.Boolean
    (Optional) true to specify that the form has a scroll bar; otherwise false. The default is false.
  • loop
    Type: System.Boolean
    (Optional) true to specify that the form displays its results in a continuous loop; otherwise false. The default is false.
  • live
    Type: System.Boolean
    (Optional) true to specify that the form should poll for new results; otherwise false. The default is false.
  • hashTags
    Type: System.Boolean
    (Optional) true to specify that Twitter posts should display hash tags; otherwise false. The default is true.
  • timestamp
    Type: System.Boolean
    (Optional) true to specify that Twitter posts should display a timestamp; otherwise false. The default is true.
  • avatars
    Type: System.Boolean
    (Optional) true to specify that Twitter posts should display an avatar; otherwise false. The default is false.
  • behavior
    Type: System.String
    (Optional) "default" to specify that the form should display its results in an interval specified by searchInterval, or "all" to specify that a form should display all results at once. The default value is "all".
  • searchInterval
    Type: System.Int32
    (Optional) The interval, in milliseconds, at which the form should display new results. The default is 6000.

Return Value

Type: HtmlString
The markup to render the Twitter feed.

Permissions

  • Medium trust for the immediate caller. This member can be used by partially trusted code.

See Also

Reference

Twitter Class

Microsoft.Web.Helpers Namespace