Search code examples
phpjoomlaeasyblog

Use EasyBlog's autoposting from external PHP


I'm trying to autopost an EasyBlog blog post from my own component to Twitter. I currently have:

$blog = EasyBlogHelper::getTable( 'Blog' );
$blog->load( $postId );
$blog->autopost(array('twitter'));

autopost says it's successful, but the post isn't showing up on Twitter, nor is there an indicator in the backend of my Joomla site. I don't get any error messages.

What can I do to achieve this?


Solution

  • As it turns out, I was using EB's API incorrectly. The final line should be:

    $blog->autopost(array('twitter'), array('twitter'));