Helper Properties
static string | AppId |
Gets or sets the Facebook application id. | |
static string | AppSecret |
Gets or sets the Facebook application secret. | |
static string | MembershipDBName |
Gets or sets the name of the database used for storing the membership data. | |
static string | Language |
Gets or sets the code of the language used to display the Facebook plugins. |
Helper Methods
Method | Requires Initialization | Requires Publishing | |
---|---|---|---|
static void | Initialize (string appId, string appSecret, [string membershipDBName]) | - | - |
Initialize the helper with your Facebook application
settings. If the 'membershipDBName' parameter is specified, Facebook membership integration will be enabled, allowing users to register and associate their Facebook user account (identified with the e-mail) with your site membership and the WebSecurity helper. In this case, the helper will initialize the WebSecurity WebMatrix helper automatically (if not done previously) and the store the membership information in the 'membershipDbName' database. |
|||
@helper | GetInitializationScripts() | - | - |
Initialize the Facebook JavaScript SDK to be able to support the XFBML tags of the social plugins. | |||
UserProfile | GetFacebookUserProfile() | Yes ( only Initialize(...) ) | No |
Retrieves the Facebook profile of current logged in user. See the section at the bottom of the page for details on the information you can access. | |||
static void | AssociateMembershipAccount (string userName) | Yes (only Initialize(...) ) | No |
Associates the specified user name (e.g. email, depending on your membership model) with the current Facebook User Id from the logged user. See the Facebook.Bakery sample Web site for an example on how to use this method. | |||
@helper | LoginButton (string registerUrl, [string returnUrl], [string callbackUrl] [string buttonText], [bool autoLogoutLink], [string size], [string length], [bool showFaces], [string extendedPermissions]) | Yes | No |
Shows a Facebok Login Button, with site membership
integration, allowing users to login on your site with their Facebook account
(e-mail). To use this method, you need to provide the 'membershipDbName' in the helper's Initialize method. |
|||
@helper | GetLoginButtonTagOnly ([string buttonText], [bool autoLogoutLink], [string size], [string length], [string onLogin], [bool showFaces], [string extendedPermissions]) | No | No |
Shows a Facebook Login Button, without integrating Facebook login with your site membership. | |||
@helper | LikeButton ([string href], [string buttonLayout], [bool showFaces], [int width], [int height], [string action], [string font], [string colorScheme], [string refLabel]) | No | No |
Shows a Facebook Like Button. When the user clicks the Like button on your site, a story appears in the user's friends' News Feed with a link back to your website. | |||
@helper | Comments ([string xid], [int width], [int numPosts], [bool reverseOrder], [bool removeRoundedBox]) | Yes | No |
Shows a Facebook Comments plugin. The Comments Box easily enables your users to comment on your site's content — whether it's for a web page, article, photo, or other piece of content. | |||
@helper | Recommendations ([string site], [int width], [int height], [bool showHeader], [string colorScheme], [string font], [string borderColor], [string filter], [string refLabel]) | No | Yes |
Shows a Facebook Recommendations plugin. The Recommendations plugin shows personalized recommendations to your users. | |||
@helper | LikeBox ([string profileId], [string name], [int width], [int height], [string colorScheme], [int connections], [bool showStream], [bool showHeader]) | No | No |
Shows a Facebook Like Box. The Like Box is a social plugin that enables Facebook Page owners to attract and gain Likes from their own website. | |||
@helper | Facepile ([int maxRows], [int width]) | Yes | No |
Shows a Facebook Facepile plugin. The Facepile plugin shows the Facebook profile pictures of the user's friends who have already signed up for your site. | |||
@helper | LiveStream ([int width], [int height], [string xid], [string viaUrl], [bool allwaysPostToFriends]) | Yes (only Initialize(...) ) | No |
Shows a Facebook Live Stream plugin. The Live Stream plugin lets users visiting your site or application share activity and comments in real time. | |||
@helper | ActivityFeed ([string site], [int width], [int height], [bool showHeader], [string colorScheme], [string font], [string borderColor], [bool showRecommendations]) | No | Yes |
Shows a Facebook Activity Feed plugin. The activity feed displays stories both when users like content on your site and when users share content from your site back to Facebook. | |||
@helper | OpenGraphRequiredProperties (string siteName, string title, string type, string url, string imageUrl, [string description]) | No | Yes |
OpenGraph properties allows you to specify structured
information about your web pages to show up your pages richly across Facebook
and enable Facebook users to establish connections to your pages. Use this method to show OpenGraph page data, as the page title, URL, and so on. |
|||
@helper | OpenGraphLocationProperties ([string latitude], [string longitude], [string streetAddress], [string locality], [string region], [string postalCode], [string countryName]) | No | Yes |
Use this method to show page location data. This is useful if your pages is a business profile or about anything else with a real-world location. You can specify location via latitude and longitude, a full address, or both. | |||
@helper | OpenGraphContactProperties ([string email], [string phoneNumber], [string faxNumber]) | No | Yes |
Use this method to show contact information about your page. Consider including contact information if your page is about an entity that can be contacted. | |||
@helper | FbmlNamespaces () | No | No |
Use this method inside your opening HTML tag for W3C compatibility. |
User Profile Information
string Id | Facebook User Id |
string Name | Display Name |
string First_Name | First Name |
string Last_Name | Last Name |
string Link | Link to Profile |
string Bio | Short biography |
string Gender | Gender |
string Email | Published e-mail address |
string Timezone | User timezone |
string Locale | User regional settings |
string Updated_Time | Last updated time on Facebook |