Domanda

Sto cercando di pubblicare il flusso sulla mia pagina parete sito di Facebook.

finora sono riuscito a pubblicare flusso attraverso la mia pagina APP, ma io non voglio via, voglio pubblicare direttamente.

come ho detto prima, voglio pubblicare sulla mia pagina parete sito di Facebook, non sulla pagina di parete app.

Non riuscivo a trovare qualcosa di utile ... anche io voglio pubblicare con PHP se questo è possibile .. se non è possibile che io che dovrò usare js. in ogni caso come posso farlo?

È stato utile?

Soluzione

questo è come lo faccio con PHP:

 //Note that you will need to have the access token which is what gives permission to write.
 function self_fb_post($to_uid,$acToken) {
    global $fb; //this is the fb object
    $result = false;
    $feed_dir = '/'.$to_uid.'/feed/';  //to the UID you want to send to
    $message_str =  'Why does facebook development not have decent support';
    $msg_body = array('access_token' => $acToken,   
                  'name' => 'My wall post',
                  'message' => $message_str,
                  'caption' => "www.mysite.com",
                  'link' => 'http://www.mysite.com',
                  'description' => 'A wall post which is used to express the frustration of working with crappy facebook developer documentation', 
                  'picture' => 'http://farm6.static.flickr.com/1111/some-pic.jpg',
                  'actions' => array(array('name' => 'My Site',
                              'link' => 'http://www.mysite.com'))
                  );

try {
            //this is the API call that does it all
    $result = $fb->api($feed_dir, 'post', $msg_body);
} 
catch (Exception $e) {       
    $err_str = $e->getMessage();
}


     return $result;
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top