# Facebook API pop up dialog

**URL:** <https://forum.kirupa.com/t/facebook-api-pop-up-dialog/310398>\
**Category:** Uncategorized\
**Created:** [June 9, 2010, 8:45am UTC](https://forum.kirupa.com/t/facebook-api-pop-up-dialog/310398 "2010-06-09T08:45:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sansrival](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sansrival](https://forum.kirupa.com/u/sansrival)\
**Post date:** [June 9, 2010, 8:45am UTC](https://forum.kirupa.com/t/facebook-api-pop-up-dialog/310398/1 "2010-06-09T08:45:33Z")

</div>

Hi i have a question about how to create a pop up dialog using facebook application, i found some examples but it doesn’t worked for me, now i loaded my friends then beside the profile pic of my friends in have a button name select, where if i select that current friend it will now pop up the image and name then have a button continue how should i do that???  
thanks for your future suggestions.

this is my code:

```php

foreach($friends as $friend) {
   
    echo "<fb:profile-pic size=small uid=$friend linked=false></fb:profile-pic><fb:name useyou=false uid=$friend firstnameonly=false></fb:name><br><input type='button' value='Select!' onclick=' return showMe()'></td>";
} 

<fb:js_string var='get_selected_friends'>
<fb:fbml>
        <fb:profile-pic size=small uid=$friend linked=false></fb:profile-pic>
        <fb:name useyou=false uid=$friend firstnameonly=false></fb:name><br>
    </fb:fbml>    
</fb:js_string>

```

```auto

<script language='javascript'>
var dialog;
function showMe()
{
    
    dialog = new Dialog();
    dialog.showChoice('', get_selected_friends);
}
</script>";

```

when i click the select button the dialog pop up my friend that was last kon the list, what i want is when i click the button it could pop the current user i click. hmm hope that i stated it clearly here.

thanks a lot 😃
