title: Facebook App FBML, fb:friend-selector get friend userid
body: <p>i am trying to get the current logged in user's friends, they should select one friend using the form below and then submit it to the same page.
  The script is suppose to get the friend's userid (only one) and add it to the database.</p>
  
  <p>The script is working fine but its not posting the right ID (Wrong ID <code>$_POST['friend_selector_id']</code>), it posts an id that looks like this: 2147483647 and i am not sure if this is the profile id or what but i need the id that you use with this code <code>&lt;fb:profile-pic uid=</code>. i need the userid. Could somebody help me out ?</p>
  
  <p>Thank You :D</p>
  
  <pre><code>&lt;form action="&lt;?php echo $appCanvasUrl.'challenge.php?gameid='.$_GET[gameid].'&amp;userid='.$user.'&amp;userid2='.$friend_selector_id; ?&gt;" id="challenge" method="post"&gt;
  &lt;fb:friend-selector uid="&lt;?PHP echo $user; ?&gt;" name="userid2" idname="friend_selector_id"/&gt;
  &lt;INPUT type="submit" value="Challenge"&gt; &lt;/form&gt;
  &lt;?php
      if(isset($_GET['gameid']) &amp;&amp; is_numeric($_GET['userid']) &amp;&amp; isset($_GET['userid2'])) {
      $gameid = am_injection($_GET[gameid]);
      $userid2 = am_injection($_POST['friend_selector_id']);
      $userid1 = am_injection($user);
      am_queries($db, "INSERT INTO `AMCMS_challenges` (`primkey` ,`userkey1` ,`userkey2` ,`gameid` ,`winner`, `score1`, `score2`) VALUES (NULL, $userid1, $userid2, $gameid, 0, 0, 0);");
      echo 'Challenge recorded.';
      } else {
      echo 'Please select a friend to challenge!';
      exit;
      }
  </code></pre>