【发布时间】:2011-07-31 10:56:15
【问题描述】:
我创建了一个应用程序,用户可以在其中将消息发布到他们自己的墙上! 这是我的代码
try {
$facebook = new Facebook(FB_APIKEY, FB_SECRET);
$facebook->api_client->session_key = FB_SESSION;
$fetch = array('friends' =>
array('pattern' => '.*',
'query' => 'select uid2 from friend where uid1={$user}'));
$message = 'Hello There ...';
if ($facebook->api_client->stream_publish($message)) //149th line
echo 'message posted successfully';
} catch(Exception $e) {
echo $e . '<br />';
}
它返回一个错误致命错误:Call to undefined method stdClass::stream_publish() in /home/webshine/public_html/tutorials/fb/example.php on line 149 怎么了?
【问题讨论】:
-
我在 stackoverflow 上读过类似的问题,但没有一个有帮助!
标签: php facebook facebook-php-sdk