如何在PHP如何使用Facebook的API在PHP
我用下面的代码,但不工作
$result = $facebook->api('/me/feed/','post',array('message' => '<h1>This is my demo Face book application!</h1>'));
我使用Facebook的API张贴在Facebook涂鸦墙HTML内容张贴在Facebook涂鸦墙HTML内容使用下面的代码使用PHP拼接HTML字符串
$result = $facebook->api('/me/feed/','post',array('message' => 'This is my demo Facebook application!' . $htmlStr));
,但没有工作,得到以下错误
OAuthException: (#1) An unknown error occurred
任何请帮助我。
你有一个oauth标记,你确定它是有效的吗? 您可以通过将浏览器指向https://graph.facebook.com/me/feed?access_token = ... – 2010-09-11 09:27:29
进行测试。顺便说一下,您无法将HTML张贴到墙上,只能显示纯文本。 – 2010-09-11 09:29:36
我需要发布标志图片描述我累了下面的代码,但不工作 $ attachment = array('message'=>'一些meesgae','name'=>'这是我的演示Facebook应用程序!','caption '=>“邮政标题”,'link'=>'http://mylink.com','description'=>'这是一个描述','picture'=>'http://mysite.com /pic.gif','actions'=> array(array('name'=>'Get Search','link'=>'http://www.google.com'))); $ result = $ facebook-> api('/ me/feed /','post',$ attachment); – Elankeeran 2010-09-11 18:30:32