如何解决Facebook多好友选择器无法在RoR应用程序中使用
| 我试图在我的Ruby on Rails应用程序中实现Facebook多好友选择器。 FB登录已经完成。我试图将此代码粘贴到我的视图中,但似乎没有用。 <fb:serverFbml>
<script type=\"text/fbml\">
<fb:fbml>
<fb:request-form
method=\'POST\'
type=\'an invitation to do this.\'
content=\'I invite you to do this.
<fb:req-choice url=\"http://apps.facebook.com/smiley/yes.php\" label=\"Yes\" />
<fb:req-choice url=\"http://apps.facebook.com/smiley/no.php\" label=\"No\" />\'
<fb:multi-friend-selector actiontext=\"I invite you to do this.\">
</fb:request-form>
</fb:fbml>
</script>
</fb:serverFbml>
我可以看到Facebook中的“正在加载”指示器,但它似乎永远存在。
我在这里想念什么吗?请帮助!
解决方法
<div id=\"facebook_invites\" class=\"conclusion\" style=\"width: 750px; text-align: center\">
If you like <%= link_to \"BillBaba.com\",\"/\",:target => \"_BLANK\" %>,then please help us by spreading the word.<br/>
<a id=\"wall_post\" href=\"#\" style=\"font-size: 2em;\">Post on your Wall</a><br/>
<a id=\"invite_friends\" href=\"#\" style=\"font-size: 1.5em;\">Invite your Friends</a>
</div>
<div id=\"fb-root\"></div>
<script type=\"text/javascript\" src=\"http://connect.facebook.net/en_US/all.js\"></script>
<script type=\"text/javascript\">
$(\'#wall_post\').click(function() {
FB.init({
appId:\'<%= @app_id %>\',cookie:true,status:true,xfbml:true
});
FB.ui({ method: \'feed\',link: \'http://www.billbaba.com\',picture: \'http://www.billbaba.com/images/logo.gif\',description: \'There is so much more to life,other than bill payments. Try BillBaba.com and never miss another bill payment.\',name: \'BillBaba.com\'});
});
$(\'#invite_friends\').click(function() {
FB.init({
appId:\'<%= @app_id %>\',xfbml:true
});
FB.ui({ method: \'apprequests\',message: \'There is so much more to life,other than bill payments. Try BillBaba.com and never miss another bill payment.\'});
});
</script>
@app_id是从控制器传递的应用程序ID。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。