开发者

invite Facebook friends to Rails application

I am trying to send friends an invitation or request to visit a website I am building.

I have the following dialogue box which allows me to select the friends I wish to invite:

<div id="fb-root"></div>
<a href="#" id="invite_fb_friends">Invite your friends</a>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
$(function(){
    $("a#invite_fb_friends").click(function(){
        FB.init({
        appId: '239473799421284',
        status: true,
        cookie: false,
        // xfbml: true
        });

FB.ui({
method: 'apprequests',
message: '<%=current_user.name %> has invite you to a party for <%=get_current_board.bp_name%>'});
});
});
</script>

This works fine and I sen开发者_如何学God the invitation. However when the user clicks the accept button they just reload the same page they are on.

Here is the setup in Facebook for the Application:

Website

Site URL:http://localhost:3000/

Site Domain:localhost

App on Facebook
Canvas URL:http://localhost:3000/pages/facebook_invite/

How can I get this link to go to my site?


I figured it out thanks to this posting on stackoverflow Facebook Developers Section

On the Facebook Application page Edit Application they changed the name for the canvas page.

invite Facebook friends to Rails application

It is now called App Namespace and you must enter a unique name here. Then it all worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜