使用PHP Pecl OAuth发布博客帖子,whithout Zend GData

使用PHP Pecl OAuth发布博客帖子,whithout Zend GData,php,http,oauth,blogger,Php,Http,Oauth,Blogger,我的FreeBSD web服务器不支持Zend框架,所以我正在尝试使用php的pecl oauth扩展来解决这个问题。经过数小时的谷歌搜索和一天的实施,我收到了一个博客列表,但我无法发布新的博客文章。 我找到了这个提要,并在那里实现了它。 以下是我的解决方案的一部分: $data = '<entry xmlns=\'http://www.w3.org/2005/Atom\'> <title type=\'text\'>Marriage!</title

我的FreeBSD web服务器不支持Zend框架,所以我正在尝试使用php的pecl oauth扩展来解决这个问题。经过数小时的谷歌搜索和一天的实施,我收到了一个博客列表,但我无法发布新的博客文章。 我找到了这个提要,并在那里实现了它。 以下是我的解决方案的一部分:

$data = '<entry xmlns=\'http://www.w3.org/2005/Atom\'>
        <title type=\'text\'>Marriage!</title>
        <content type=\'xhtml\'>
            <div xmlns="http://www.w3.org/1999/xhtml">
            <p>Mr. Darcy has <em>proposed marriage</em> to me!</p>
            <p>He is the last man on earth I would ever desire to marry</p>
                <p>Whatever shall I do?</p>
            </div>
    </content>
        <category scheme="http://www.blogger.com/atom/ns#" term="marriage" />
        <category scheme="http://www.blogger.com/atom/ns#" term="Mr. Darcy" />
    </entry>'; 
    $params = array(
        'request_token_url' => 'https://www.google.com/accounts/OAuthGetRequestToken',
        'request_token_url_data' => array('scope' => 'http://www.blogger.com/feeds', 'oauth_callback' => $callback_url),
        'autorize_url' => 'https://www.google.com/accounts/OAuthAuthorizeToken',
        'access_token_url' => 'https://www.google.com/accounts/OAuthGetAccessToken',
        'callback_url' => $callback_url,
        'call_url' => 'http://www.blogger.com/feeds/{$blog->id}/posts/default',
        'call_url_data' => $data,
        'service' => 'google',
        'method' => OAUTH_HTTP_METHOD_POST,
        'header' => array('Content-Type' => 'application/atom+xml'),
作为回应,我收到:

400错误请求无效请求URI或标头,或不受支持 非标准参数


我被困在这里。可能$data格式不正确?

是否已修复autorize\u url的拼写?是的,但这只是一个数组键。
$oauth->setToken($_SESSION[$oauth_token],$_SESSION[$oauth_secret]);
$oauth->fetch($params['call_url'], $params['call_url_data'], $params['method'], $params['header'])
return $oauth->getLastResponse();