Need some help with a simple facebook PHP

Discussion in 'PHP' started by web@master24, Feb 8, 2011.

  1. #1
    Hello everyone, i hope somebody can help me, im using on my website a code for publish media content on the wall, but i see what is possible make the content will be publish on the friends wall of the user, im using right now this:

    <script type="text/javascript">
    
    
     //stream publish method
                function streamPublishFriend(name, description, hrefTitle, hrefLink, userPrompt){
               FB.ui(
       {
         method: "stream.publish",
    display: "popup",
    target_id: "target_ids",
             message: "Im listen the song {title} on www.xxxxxx.net ",
         attachment: {
           name: "xxxxx.net - Download this song",
           caption: "xxxxx.net - The best music",
          description: (
             "Share your favorite music tracks and videos with " +
             "your friends on facebook using the new facebook application, " +
             "from www.xxxxxx.net ."
           ),
           href: "http://www.xxxxx.net/music/{title}/{enbedid}",
    media: [{
            "type": "mp3", 
        "src": "http://www.xxxxx.net/getfile/{enbedid}.mp3", 
        "title": "{title}",
    "artist": "{title}"
                   }]
         },
         action_links: [
           { text: "XXXXX.net", href: "http://www.xxxxx.net" }
         ],
         user_message_prompt: "Im listening::"
       },
       function(response) {
         if (response && response.post_id) {
           alert("The song was post on your wall");
         } else {
           alert("The song wasnt post on your wall");
         }
       }
     );    
     
                }
    			
        </script>
    Code (markup):
    but i see what with the function: target_id= is possible put there ethe account id of the friend, the thing i want to do is get the friend list and parse the friend id, something like this:

    http://www.socialsensation.com/connect-proj/

    I hope somebody can help me.

    thank you
     
    web@master24, Feb 8, 2011 IP