2010-08-31 7 views
0

je veux faire mon application publier sur mon mur, je peux poster sans aucun problème, mais je ne sais pas comment popup deAfficher un popup avant de poster dans le mur Facebook

ici est mon 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); 

J'ai essayé auto_publish, mais sans succès, une idée? J'ai attacha une image, montrant ce que je veux.

alt text

Répondre

2

Cela ne se fait avec l'API PHP, son fait via l'API Javascript!

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

Questions connexes