tags:

views:

20

answers:

1

i want to make my app publish on my wall, i can post without any problems, but i dont know how to popup

here is my code

        $attachment =  array(
            'message' => 'Did a Test Post :',
            'name' => "This is the title of my post",
            'link' => "http://www.lydiadana.com.br",
            'description' => htmlentities($linha['post_content']),
            'picture'=> IMG_DIR . $file,
            'auto_publish' => false,
            'user_prompt_message' => 'Share your thoughts about RELL',
    );


    $facebook->api('me/feed', 'POST', $attachment);

i tried auto_publish, but without sucess, any idea ? i have attachaed a image, showing what i want.

alt text

+1  A: 

This is not done with the PHP API, its done via Javascript API!

FB.ui(
   {
     method: 'stream.publish',
     message: 'getting educated about Facebook Connect',
     attachment: {
       name: 'Connect',
       caption: 'The Facebook Connect JavaScript SDK',
       description: (
         'A small JavaScript library that allows you to harness ' +
         'the power of Facebook, bringing the user\'s identity, ' +
         'social graph and distribution power to your site.'
       ),
       href: 'http://github.com/facebook/connect-js'
     },
     action_links: [
       { text: 'Code', href: 'http://github.com/facebook/connect-js' }
     ],
     user_message_prompt: 'Share your thoughts about Connect'
   },
   function(response) {
     if (response && response.post_id) {
       alert('Post was published.');
     } else {
       alert('Post was not published.');
     }
   }
 );

http://developers.facebook.com/docs/reference/javascript/FB.ui

RobertPitt