简体   繁体   中英

Showing a popup before posting in facebook wall

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.

替代文字

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM