Facebook multi-friend-selector always displays email invite section - facebook

I managed to get fb:multi-friend-selector working. However after choosing friends and sending invitations to them there is a popup "Optional: also send to email contacts?" displayed which I don't want.
According to the documentation at http://developers.facebook.com/docs/reference/fbml/multi-friend-selector there is a email_invite flag indicating whether this popup should be displayed or not.
For me it's always displayed no matter if I set email_invite="true" or email_invite="false".
Anyone knows how to get rid of this popup?
Below is the code I generate:
<fb:serverfbml>
<script type='text/fbml'>
<fb:request-form
action="http://example.com"
content="Your friend invites you to Test site <fb:req-choice label="Accept" url="http://example.com/" />"
invite="true"
method="post"
type="Test site">
<fb:multi-friend-selector
actiontext="Invite your friends to Test site"
bypass="cancel"
condensed="false"
email_invite="false"
exclude_ids=""
max="20"
showborder="true" />
</fb:request-form>
</script>
</fb:serverfbml>

I had the same problem and added the parameters to remove the popup :
email_invite=false
import_external_friends=false
ie.
<fb:serverfbml>
<script type='text/fbml'>
<fb:request-form
action="http://example.com"
content="Your friend invites you to Test site <fb:req-choice label="Accept" url="http://example.com/" />"
invite="true"
method="post"
type="Test site">
<fb:multi-friend-selector
actiontext="Invite your friends to Test site"
bypass="cancel"
condensed="false"
email_invite=false
import_external_friends=false
exclude_ids=""
max="20"
showborder="true" />
</fb:request-form>
</script>
</fb:serverfbml>

Related

Facebook request form not working in HTML

I am using facebook request form for my facebook iframe fanpage,
I am using below code for this
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
FB.Canvas.setAutoResize();
</script>
</head>
<body>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js"></script><script>
FB.init({
appId:"APP_ID", cookie:true,
status:true, xfbml:true
});
</script>
<fb:serverFbml width="760px">
<script type="text/fbml">
<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:multi-friend-selector
showborder="false"
actiontext="Invite your friends to use Facebook." />
</fb:request-form>
</fb:fbml>
</script>
</fb:serverFbml>
</fb:fbml>
</script>
</fb:serverFbml>
The code was working ok earlier around 15-20 days back, now the same is not working. Now only loading frame appears instead of list of friends.
Please suggest how to overcome this issue?
Thanks in advance for the help
this works (for the time being): http://www.ajado.com/blog/embedding-a-xfbml-facebook-friend-invite-request-form-javascript-only/
however, i did not find a way to get this part working:
<fb:req-choice url="see fb:req-choice docs for details."
label="Ignore the Facebook test app!" />
">

problem in fb:request-form

In the my facebook app i m using fb request form there i want to know that user has send friend request to any one or just skip the page.
code is
<fb:serverFbml width= "620" style="float:center">
<script type="text/fbml">
<fb:fbml>
<fb:request-form
action='<?php echo $config["base_url"]."?action=3;?>'
target="_top"
method="POST"
invite="true"
type="....some thing"
content="...some thing"
>
<fb:multi-friend-selector target="_top"
showborder="false"
actiontext="----" rows='4' cols='4' max='1' import_external_friends = "false">
</fb:request-form>
</fb:fbml>
</script>
</fb:serverFbml>
as the developer document says that if user either send the request or skip the request page it will go to action URL . Is there any thing to differentiate between these two case.
Please ignore any English grammar mistake.
Thanks in Advance.
The information you're looking for is most likely included in the server response, check it.
Btw, FBML is going to be deprecated very soon, so if this is a new application, you better switch to the JavaScript SDK.

Redirection is not happening correctly after sharing an app usign the multi-friend-selector

I'm using the facebook multi-friend-selector in my facebook page which is loading all my friends in an iFrame. But after selecting a friend from the list and sending an invitation then redirection is not happening correctly to the corresponding callback URL.
I just struck up with this issue, can anybody please help me to fix this issue.
My code for the multi-friend-selector is:
<fb:serverfbml>
<script type="text/fbml">
<fb:fbml>
<fb:request-form action="http://gelofactory.com/dev/SPIN/SXSW/share.php" method="POST" invite="true" type="Download" content="Sharing">
<fb:multi-friend-selector showborder="false" bypass="cancel" email_invite="false" import_external_friends="false" actiontext="Share with your friends." cols="3" rows="3" />
</fb:request-form>
</fb:fbml>
</script>
</fb:serverfbml>
Thanks,
Siva
Are you getting any errors? anyway, here are some suggestions:
Please consider using the new Requests Dialog
Make sure you are using the Canvas URL in the action parameter: http://CANVAS_URL/path/to/share.php

Facebook FBML issue - req-choice required as part of request-form content?

When I try to send invitations from my site, I am getting this error, "req-choice required as part of request-form content". What does it mean?
These are the details I gave when I created application:
App. Name : mysitename
ConnectURL: http://www.mysite.com/
Below is the code I am using. Am I missing something?
<fb:serverfbml style="background-color:#F7F7F7;">
<script type="text/fbml">
<fb:fbml>
<fb:request-form
action='http://www.mysite.com/confirm.php'
method='POST'
invite='true'
type='mysite'
content='Come and join us. Visit us at http://www.mysite.com/'
<fb:req-choice url='http://www.mysite.com/' label='Join'/>
<fb:multi-friend-selector
showborder='false'
actiontext='Invite your friends to join'
rows='4'
/>
</fb:request-form>
</fb:fbml>
</script>
</fb:serverfbml>
I believe your tag attributes are a bit out of order. The content attribute of an fb:request-form is a string that should contain the fb:request-choice tag. The best way to do this is to use double-quotes around the content attribute value, and single quotes for everything inside that. You need to re-organize your code like this:
<fb:request-form
action="http://www.mysite.com/confirm.php"
method="POST"
invite="true"
type="mysite"
content="Come and join us. Visit us at http://www.mysite.com/
<fb:req-choice url='http://www.mysite.com/' label='Join'/>
"
>
<fb:multi-friend-selector
showborder="false"
actiontext="Invite your friends to join"
rows="4"
/>
</fb:request-form>
Note how the fb:req-choice tag is actually inside the content attribute string.

Facebook, iframe app, fb:request-form, action attribute problem

I'm making a facebook iframe application
I'm making a request form with my own form data. What should I do in order to process the data?
If I put action="http://apps.facebook.com/[appName]/abc.php" , i.e.
<fb:serverfbml>
<script type="text/fbml">
<fb:fbml>
<fb:request-form action="http://apps.facebook.com/[appName]/abc.php" method="post" type="abc" content="abc">
<textarea name="pm" fb_protected="true" ></textarea>
<fb:multi-friend-selector showborder="false" max="35" actiontext="test" email_invite="true" bypass="cancel" />
</fb:request-form>
</fb:fbml>
</script>
</fb:serverfbml>
Then the result is funny... A facebook page inside the facebook app's iframe !
but if I put action="http://[my own domain / facebook connect url]/abc.php" , i.e.
<fb:serverfbml>
<script type="text/fbml">
<fb:fbml>
<fb:request-form action="http://[my own domain / facebook connect url]/abc.php" method="post" type="abc" content="abc">
<textarea name="pm" fb_protected="true" ></textarea>
<fb:multi-friend-selector showborder="false" max="35" actiontext="test" email_invite="true" bypass="cancel" />
</fb:request-form>
</fb:fbml>
</script>
</fb:serverfbml>
Then the result page will be rendered WITHOUT facebook template (that means losing all top facebook banner and bottom facebook bar like the facebook chats etc)
Anyone knows what's wrong?
Thanks a lot for reading
The key to the target="_top" is that you have to place it on both the request form and the multi-friend-selector in order for it to work on submit and cancel, respectively.
The request-form needs target="_top" so that the form will load in the top frame when submitted, but the cancel functionality is controlled by the multi-friend-selector, not the request-form. Ergo, you need target="_top" on the multi-friend-selector as well so that the cancel action will load in the top frame.
Now, I just wish Facebook would allow a "none" action for cancel that would just hide the frame...
NEW Answer:
Facebook has started phasing out FBML and is strongly encouraging developers to switch to Requests 2.0. Using the new FB.ui({method:'apprequest',...}); in the JavaScript SDK is an easier way to do this. It also supports off-Facebook pages http://af-design.com/blog/2011/02/17/using-facebook-requests-to-promote-a-website/
OLD Answer:
I found that passing the FBML as an attribute for fb:serverfbml worked.
<fb:serverfbml fbml=" {HTML Escaped FBML Here} " ></fb:serverfbml>
I posted about my findings here: http://af-design.com/blog/2010/11/23/fbserverfbml-on-canvas-iframe/
The way I handled this was to have my form processor page emit no output except an "< fb:redirect >" that pointed back to the main app.
How did you use this < fb:redirect > ?
ok I found it try adding target="_top"
http://apps.facebook.com/myapp' label='Join Now' />"
action="http://apps.facebook.com/myapp"
target="_top"
invite="true">