如何使用将自动控制的与hybridAuth连接到facebook页面?
我有一个网站和一个facebook页面的网站,我使用hybridAuth登录到网站,它运行良好,现在我想使用hybridAuth的一些自动化的帖子到facebook页面。
这就是如何使用hybridAuth将文章发布到用户的墙上。
$facebook = $hybridauth->authenticate( "Facebook" );
$facebook->api()->api("/me/feed", "post", array(
"message" => "Hi there",
"picture" => "http://www.mywebsite.com/path/to/an/image.jpg",
"link" => "http://www.mywebsite.com/path/to/a/page/",
"name" => "My page name",
"caption" => "And caption"
));发布于 2015-04-07 18:34:19
这条线已经很老了,但是外面的人可能还在为这个挑战而挣扎。您可以通过简单地使用此函数将其发布到facebook用户的墙上。
// init hybridauth
$hybridauth = new Hybrid_Auth( $config );
// try to authenticate with facebook
$adapter = $hybridauth->authenticate( "Facebook" );
// update the user status or post to wall
$adapter->setUserStatus(
array(
"message" => "", // status or message content
"link" => "", // webpage link
"picture" => "", // a picture link
)
);欲了解更多详情,请访问杂交公司的官方网页:Status.html
https://stackoverflow.com/questions/20641857
复制相似问题