风火家人开发记要

技术总结精华贴

Month: March 2012

其他, 原创

facebook邀请好友加入应用使用fb:fbml标签无效解决方案

使用 fb:fbml 标签无效,需要在页面中加入这样一段代码 <div id=”fb-root”></div> <script type=”text/javascript”> window.fbAsyncInit = function() { FB.init({ appId : “YOUR_APP_ID”, channelUrl : “//YOUR_DOMAIN.COM/channel.html”, status : true, cookie : true, xfbml : true }); // Additional initialization code here }; // Load the SDK Asynchronously (function(d){ var js, id = ‘facebook-jssdk’, ref = d.getElementsByTagName(‘script’)[0]; if (d.getElementById(id)) {return;} js = d.createElement(‘script’); js.id = id; js.async = true; js.src = “//connect.facebook.net/en_US/all.js”; ref.parentNode.insertBefore(js, ref); }(document)); </ script> 这里面提到的url不要加http或者https,系统会根据当前协议自动补齐的。 上面代码使用的是 javascript SDK ,摘自 http://developers.facebook.com/docs/reference/javascript/ 这样就可以在html中使用fb:fbml标签了 下面例子是邀请好友加入应用 <fb:serverFbml style=”width: 755px;”> <script type=”text/fbml”> <fb:fbml> <fb:request-form action=”<URL for post invite action, see fb:request-form docs for details>” method=”POST” invite=”true” type=”XFBML” content=”This is a test invitation from XFBML test app <fb:req-choice url=”see fb:req-choice docs for details.” label=”Ignore the Facebook test app!” /> “> </fb:request-form> <fb:multi-friend-selector showborder=”false” actiontext=”Invite your friends to use Facebook.” /> </fb:fbml> </script> </fb:serverFbml> 通过上面的的js调用就可以正常显示上面fb代码了,希望对你有所帮助。 (774)

查看全文
Mysql, 原创,

多次安装wamp后Mysql无法启动解决方案Not first time to install wamp, Mysql cannot be started

如果不是首次安装wamp或着mysql,可能会遇到安装后无法启动的问题。我是由于升级wamp,升级后无法启动mysql服务。 下面是我的解决方法: 1.准备升级网站的时候首先备份mysql,如果因为安装mysql的路径不同,可能会导致mysql的数据无法使用,这个一定要先做。 2.卸载旧版的wamp或者mysql。(尝试安装新版wamp看是否成功,一般是mysql无法启动了)。 4.下面的方法是关键:删除mysql注册表 msyql安装到最后一步start service错误解决方法 1,到控制面板里面先把MySQL删除. 2.到c盘C:\Program Files目录下把MySQL目录删除. 3.如果在其他盘还有设置目录也要删除.空目录也要删除 4.到regedit把注册表 1. HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL 2. HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL 3. HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL 有的话,全部删除! (技巧:用F3循环查找“MySQL”) 5.如果任务管理器里有关MySQL内容也删除 通过上面的步骤一般都可以正常安装和启动mysql了。希望能对你有所帮助。If you are not the first time to install wamp or mysql,you may come across this problem,mysql unable to start up. I wanted to update wamp to the latest, and found that mysql server cannot be stated. This is my resolvent: 1.If you want to update your wamp or mysql ,you need first to backup mysql data first,or you may find some of data in database cannot be use. 2.uninstall older wamp or mysql.(you can try to install wamp to see it wether success or not.) 3.this below is the most impotent:delete mysql register mysql server cannot be start 1)  to Control Panel to delete Mysql 2) delete Mysql File in c:\Program Files 3) If there are  Mysql Files On Other disk,alse delete 4). Start->cmd->regedit  delete these (1). HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL (2). HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL (3). HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL you can use F3 to find MySQL 5.If there is mysql in Task Manager,alse delete. Use this,you can install now,hope it can help you. (1101)

查看全文