A drop-down list of friends on Facebook

I'm developing an application using the PHP SDK to Facebook.

On the canvas is validating my sign in using facebook. php and php. base_facebook.

On the first page that you can populate a drop-down list with my friends Facebook by using the following code.

However, the following pages I am having trouble getting the list of Facebook friends after moving the user ID using the Facebook form. User ID coming through, but I can't get the list of friends.

Do you need to include references to facebook. php and php-base_facebook. perhaps something else on the following pages on abale to obtain a list of friends?

Thanks for your help.

<>
$ Uid = $ user;
Try {
$ Fql = "select name, uid uses uid in (select uid2 from friend where uid1 =". $ uid. ") Order by name";
$ Param = array (
' Method ' = fql query > '. ',
' Query ' = > $ fql,
' Callback ' = > '
);
$ Friend_list = $ Facebook-> api ($ param);
}
{Catch (exception $ o)
D ($ o);
}
$ I = 1;
{Foreach ($ friend_list as $ rec)
Echo "