Class SocialUserInfo
Represents social network user common information
Inheritance
System.Object
SocialUserInfo
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.Web.dll
Syntax
[Serializable]
public abstract class SocialUserInfo
Constructors
SocialUserInfo(SocialNetwork, Nullable<SocialUserInfoToken>)
Declaration
protected SocialUserInfo(SocialNetwork issuer, SocialUserInfoToken? existingToken = default (SocialUserInfoToken? ))
Parameters
Properties
BirthDate
Not all social network supports this field
Declaration
public DateTime? BirthDate { get; }
Property Value
| Type |
Description |
| System.Nullable<System.DateTime> |
|
DebugInfo
Social network specific debug info (for example, ID)
Declaration
public virtual string DebugInfo { get; }
Property Value
| Type |
Description |
| System.String |
|
DisplayName
Pseudo-field (no social network has this field. It's composed from other fields in specific way for each network.
Declaration
public abstract string DisplayName { get; }
Property Value
| Type |
Description |
| System.String |
|
Email
Not all social network supports this field
Declaration
public string Email { get; }
Property Value
| Type |
Description |
| System.String |
|
FirstName
Not all social network supports this field
Declaration
public string FirstName { get; }
Property Value
| Type |
Description |
| System.String |
|
Gender
Not all social network supports this field
Declaration
public Gender? Gender { get; }
Property Value
| Type |
Description |
| System.Nullable<Gender> |
|
ID
UserID in appropriate social Network
Sample ID's are:
Google+: 100454735382076872928
Facebook: 100007030231661
Twitter: 2227913354
VKontakte: 229735500
Linked In: h2u4-ixYiC
Declaration
public string ID { get; }
Property Value
| Type |
Description |
| System.String |
|
IssuerNetworkDescription
Returns the Sociatextual description for the social network instance that issued this user info object
Declaration
public string IssuerNetworkDescription { get; }
Property Value
| Type |
Description |
| System.String |
|
IssuerNetworkID
Returns the SocialNetID for the social network instance that issued this user info object
Declaration
public SocialNetID IssuerNetworkID { get; }
Property Value
IssuerNetworkName
Returns the name of the network that issued this info, i.e "FacebookOld".
DO NOT confuse it with network ID. One can obtain netID by getting IssuerSocialNetworkID
Declaration
public string IssuerNetworkName { get; }
Property Value
| Type |
Description |
| System.String |
|
LastError
Stores last exception of operations for this user
Declaration
public Exception LastError { get; }
Property Value
| Type |
Description |
| System.Exception |
|
LastName
Not all social network supports this field
Declaration
public string LastName { get; }
Property Value
| Type |
Description |
| System.String |
|
Locale
Locale in form "en-gb".
Not all social network supports this field
Declaration
public string Locale { get; }
Property Value
| Type |
Description |
| System.String |
|
LoginState
Indicates if user currently logged in
Declaration
public SocialLoginState LoginState { get; }
Property Value
LongTermProviderToken
Information used to perform social network operations like message post.
Can be ordinal string (e.g. Facebook) or pair of strings (e.g. Twitter)
Declaration
public virtual string LongTermProviderToken { get; }
Property Value
| Type |
Description |
| System.String |
|
MiddleName
Not all social network supports this field
Declaration
public string MiddleName { get; }
Property Value
| Type |
Description |
| System.String |
|
PictureLink
Web link to user profile picture ().
Not all social network supports this field
Declaration
public string PictureLink { get; }
Property Value
| Type |
Description |
| System.String |
|
TimezoneOffset
UTC offset in seconds.
Not all social network supports this field
Declaration
public int ? TimezoneOffset { get; }
Property Value
| Type |
Description |
| System.Nullable<System.Int32> |
|
Token
Returns a vector of Network-provided params that can be used to reconstruct SocialUserInfo object
Declaration
public SocialUserInfoToken Token { get; }
Property Value
Methods
DeserializeFromString<T>(String)
Deserializes instance from string, i.e. from database VARCHAR column
Declaration
public static T DeserializeFromString<T>(string data)where T : SocialUserInfo
Parameters
| Type |
Name |
Description |
| System.String |
data |
|
Returns
Type Parameters
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
Overrides
System.Object.GetHashCode()
GetPicture(String)
Returns user profile image or null if no image available.
Picture kind specifies classification of pictures within profile i.e. "main", "small-icon" etc.
Declaration
public Image GetPicture(string pictureKind = null)
Parameters
| Type |
Name |
Description |
| System.String |
pictureKind |
|
Returns
GetPicture(out String, String)
Returns user profile image or null if no image available.
Picture kind specifies classification of pictures within profile i.e. "main", "small-icon" etc.
Declaration
public Image GetPicture(out string contentType, string pictureKind = null)
Parameters
| Type |
Name |
Description |
| System.String |
contentType |
|
| System.String |
pictureKind |
|
Returns
PostMessage(String)
Posts message to social network
Declaration
public void PostMessage(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
SerializeToString()
Serializes current instance as string, i.e. this may be needed to store the instance in the database VARCHAR column
Declaration
public string SerializeToString()
Returns
| Type |
Description |
| System.String |
|
Extension Methods