Я не думаю, что вы правильно вызываете метод.
Вот то, что аргумент подписи выглядит должен выглядеть
/**
* Publish a post to the user's stream.
*
* @param $message the user's message
* @param $attachment the post's attachment (optional)
* @param $action links the post's action links (optional)
* @param $target_id the user on whose wall the post will be posted
* (optional)
* @param $uid the actor (defaults to session user)
* @return string the post id
*/
public function stream_publish(
$message, $attachment = null, $action_links = null, $target_id = null,
$uid = null) {
Но ваш отрывок кода показывает $appid
где $uid
ожидается.
Кроме того, это не будет работать, если пользователь в $uid
не предоставил the proper permissions вашей заявке.