Hi,
for some reason my facebook app is posting to the wall of the user who allowed the app, and not their friends like it's suppose to.
I'm just using a
$facebook->api_client->stream_publish($message, $target_id);
Anyone got any ideas?
Hi,
for some reason my facebook app is posting to the wall of the user who allowed the app, and not their friends like it's suppose to.
I'm just using a
$facebook->api_client->stream_publish($message, $target_id);
Anyone got any ideas?
Yeah, you aren't using the right method signature. Here it is as copied from my copy of the file
public function stream_publish(
$message, $attachment = null, $action_links = null, $target_id = null,
$uid = null) {
So you'd need to call it like so
$facebook->api_client->stream_publish( $message, null, null, $target_id );
If you're just starting out, you might find the Graph API and the new PHP SDK to be easier. For example:
<?php
require './facebook.php';
$fb = new Facebook(array(
'appId' => 'YOUR APP ID',
'secret' => 'YOUR API SECRET',
'cookie' => true, // enable optional cookie support
));
$post = $fb->api("$target_id/feed", 'POST', array('message' => $message));
The various parameters are documented at the bottom here.