示例#1
0
        /// <remarks>
        /// http://developers.facebook.com/docs/reference/javascript/FB.init
        /// 
        /// Name Type Description 
        /// options Object Property Type Description Argument Default 
        /// appId String Your application ID. Optional null 
        /// cookie Boolean true to enable cookie support. Optional false 
        /// logging Boolean false to disable logging. Optional true 
        /// session Object Use specified session object. Optional null 
        /// status Boolean true to fetch fresh status. Optional false 
        /// xfbml Boolean true to parse [[wiki:XFBML]] tags. Optional false 
        /// </remarks>
        public static string Init(FacebookJavascriptSdkSettings javascriptSdkSettings, bool createScriptTags)
        {
            var sb = new StringBuilder();
            if (createScriptTags)
                sb.Append("<script type='text/javascript'>");

            javascriptSdkSettings.AssertApplicationIDRequired();

            sb.AppendFormat("FB.init({0});", javascriptSdkSettings);

            if (createScriptTags)
                sb.Append("</script>");

            return sb.ToString();
        }
示例#2
0
        /// <remarks>
        /// http://developers.facebook.com/docs/reference/javascript/FB.init
        ///
        /// Name Type Description
        /// options Object Property Type Description Argument Default
        /// appId String Your application ID. Optional null
        /// cookie Boolean true to enable cookie support. Optional false
        /// logging Boolean false to disable logging. Optional true
        /// session Object Use specified session object. Optional null
        /// status Boolean true to fetch fresh status. Optional false
        /// xfbml Boolean true to parse [[wiki:XFBML]] tags. Optional false
        /// </remarks>
        public static string Init(FacebookJavascriptSdkSettings javascriptSdkSettings, bool createScriptTags)
        {
            var sb = new StringBuilder();

            if (createScriptTags)
            {
                sb.Append("<script type='text/javascript'>");
            }

            javascriptSdkSettings.AssertApplicationIDRequired();

            sb.AppendFormat("FB.init({0});", javascriptSdkSettings);

            if (createScriptTags)
            {
                sb.Append("</script>");
            }

            return(sb.ToString());
        }
示例#3
0
 public static string Init(FacebookJavascriptSdkSettings javascriptSdkSettings)
 {
     return Init(javascriptSdkSettings, false);
 }
示例#4
0
 public static string Init(FacebookJavascriptSdkSettings javascriptSdkSettings)
 {
     return(Init(javascriptSdkSettings, false));
 }