Fb:requestForm – How It Works!

You can request or invite a user to use your application or invite them for some other random reason (hacked to maybe invite them an event?) using the fb:request object.

For some reason (to be confirmed exactly!), this will not work FROM an application that is:

  1. Is new?
  2. Has not many fans?

You can use this in static FBML also! – it seems when you put it on a static FBML it works immediately? (may be issues with a relatively new site with no fans? – this has to be tested!)

INVITE type object:

View Code
 1 <fb:request-form action=”"
 2 method=”"
 3 invite=”true 4 type=”Sample”
 5 content=”Your text goes here. <?php echo htmlentities(“<fb:req-choice url=\”http://www.facebook.com/bulmerspear?v=app_403868158237\” label=\”Authorize My Application\”") ?>” >
 6 <fb:multi-friend-selector
 7 showborder=”true 8 rows=”3″ cols=”3 9 actiontext=”Invite your friends to use Sample Application.”>
10 </fb:request-form>
11 Or a REQUEST type object:
12 <fb:request-form
13 action=”"
14 method=”POST”
15 invite=”false”
16 type=”mysite”
17 content=”Come and join us. Visit us at http://www.mysite.com/ <fb:req-choice url=’http://www.mysite.com/’ label=’Join’/>”>
18 <fb:multi-friend-selector
19 showborder=”false”
20 actiontext=”Invite your friends to join”
21 rows=”4″/>
22 </fb:request-form>

 

 Request invite form on an application tab looks like:

Request then appears on the users page like below:

Opening this invitation, you get:

原文地址:https://www.cnblogs.com/lyg1990/p/2645538.html