I am attempting to use the Google AdWords API which requires a PECL 
extension for OAuth 1 to work. Because I'm using GoDaddy I'm a bit limited. 
Can anyone thing of a way around this? Here is the error message I am 
getting when trying to interact with the API:

*Fatal error*: Uncaught exception 'ValidationException' with message 
'Validation failed for [oauthHandlerClass] with value []: Pecl OAuth 
extension is required to use OAuth 1. Or a custom OAuth handler can be 
specified in settings.ini. ' in 
/home/content/39/10940939/html/adwords/public/Google/Api/Ads/Common/Lib/AdsUser.php:428
 
Stack trace: #0 
/home/content/39/10940939/html/adwords/public/Google/Api/Ads/Common/Lib/AdsUser.php(550):
 
AdsUser->GetOAuthHandler() #1 
/home/content/39/10940939/html/adwords/public/login.php(76): 
AdsUser->RequestOAuthToken('http://smartkra...') #2 {main} thrown in *
/home/content/39/10940939/html/adwords/public/Google/Api/Ads/Common/Lib/AdsUser.php
* on line *428*

On Wednesday, January 6, 2010 2:53:22 AM UTC-5, johnjaw3d wrote:
>
> The next release of pecl/oauth will support arbitrary request headers for 
> OAuth API calls via OAuth::fetch().
>
> Request headers are passed in as the last parameter to OAuth::fetch() and 
> should be an array which contains a key value pair for each header you'd 
> like to pass:
>
> $oauth->fetch(..., array('Content-Type' => 'application/atom+xml');
>
> This is currently undocumented (until the next release).
>
> If you would like, you can check out the upcoming release via svn, it has 
> been quite stable thus far:
>
> svn checkout http://svn.php.net/repository/pecl/oauth/trunk ./oauth
>
> Tjerk (datibbaw@) worked on this particular code and may be able to 
> elaborate further.
>
> - JJ
>
> On Tue, Jan 5, 2010 at 2:25 PM, koz <[email protected] <javascript:>>wrote:
>
>> Hi,
>> I'm trying to migrate my existing AuthSub blogger posting functions
>> over to use OAuth
>> [ http://code.google.com/apis/accounts/docs/OAuth_ref.html ]
>>
>> I now have the OAuth Pecl extension installed and working on my PHP
>> server
>> [ http://us2.php.net/manual/en/book.oauth.php ]
>>
>> I have been able to successfully get the required Access token and
>> Secret  and Authorization to then use them to list the users' blogs in
>> order for them to choose one and store the blog id required for
>> posting.
>>
>> I am now stuck at actually creating a post
>>
>> Has anyone had any luck at all using the PHP Pecl extension to create
>> a new blogger post?
>>
>> I know I have to send the 'extra_parameters' as as array -to the OAuth
>> call to http://www.blogger.com/feeds/".$blogId."/posts/default
>>
>> .. to send the entry
>>
>> Using AuthSub I used curl to set the Content-Type header to
>> 'application/atom+xml' along with the signed header  and add the post
>> content atom and xhtml as a post parameter to the  post url
>>
>> But I have no idea how to do this with the OAuth Pecl 'fetch'
>> function.
>>
>> if anyone could help or provide any pointers, that would be great
>> thanks!!
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "OAuth" group.
>> To post to this group, send email to [email protected] <javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/oauth?hl=en.
>>
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to