[swx] flickr api keys, secrets and tokens (Hans Elgelid)
Hans Elgelid
helgelid at telia.com
Wed Oct 31 05:38:10 PDT 2007
Hi Aidann
Thanks for your help.
>> Warning: main() [function.main]: open_basedir restriction in effect
>>
> Reckon that's an open_basedir problem ;-) When I go to the /swx/ page in my
> install it runs through a bunch of PHP checks, one of which is for that.
> Apparently
>
I'm green when it comes to PHP. How can you tell about the PHP checks?
Didn't see anything in php_error.log
> Oh, a question: what is a 'webhotell'?
>
Webhotel, webhosting and server provider are the same thing. I sometimes
look at it as my operatingsystem.
Time to give it a shot.
/Hans
> ----- Original Message -----
> From: "Hans Elgelid" <helgelid at telia.com>
> To: "SWX Mailing List" <swx at osflash.org>
> Sent: Wednesday, October 31, 2007 4:26 AM
> Subject: Re: [swx] flickr api keys, secrets and tokens (Hans Elgelid)
>
>
>
>> Don't worry about the digest mode. I'm always online but still slower than
>> you :-)
>> (Had to celebrate the angels winning football gold here in Gothenburg)
>>
>> I got the token now and file upload works fine. Thanks.
>>
>> It took some time because my first two tries went like this:
>>
>> After updating my Flikr callback address with my localhost IP address I
>> get the following.
>> Forbidden.
>> You don't have permission to access
>> /resources/swx/php/lib/phpFlickr/auth.php on this server.
>> Turned off windows firwall but no change. Mayby WAMP won't allow outsiders
>> to access Apache by default, or is it Flickr..
>>
>> When trying my cheap webhotell with coresponding Flikr callback to
>> auth.php I get the following:
>>
>> Warning: main() [function.main]: open_basedir restriction in effect.
>> File(/usr/local/lib/php/PEAR.php) is not within the allowed path(s):
>> (/home/virtual/mysite.tv:/home/virtual/_tmp) in
>> /home/virtual/mysite.tv/public_html/osflash/resources/swx/php/lib/phpFlickr/PEAR/HTTP/Request.php
>> on line 46
>>
>> Warning: main(PEAR.php) [function.main]: failed to open stream: Operation
>> not permitted in
>> /home/virtual/mysite.tv/public_html/osflash/resources/swx/php/lib/phpFlickr/PEAR/HTTP/Request.php
>> on line 46
>>
>> Fatal error: main() [function.require]: Failed opening required 'PEAR.php'
>> (include_path='.:/usr/local/lib/php:/home/virtual/mysite.tv/public_html/osflash/resources/swx/php/lib/phpFlickr/PEAR')
>> in
>> /home/virtual/mysite.tv/public_html/osflash/resources/swx/php/lib/phpFlickr/PEAR/HTTP/Request.php
>> on line 46
>>
>> Maybe some chmod'ing needed?
>>
>>
>> Finally when doing the same thing on my better webhotell a token is
>> returned and life goes on. :-)
>>
>>
>> Still wondering about authGetToken(frob) ? Do I need it now when I got the
>> token?
>>
>> /Hans
>>
>>
>> Aidann Bowley wrote:
>> Sorry for breaking the thread - had subscribed in digest mode. Changed
>> now.
>>
>> Aral,
>> no problem. I ran round in circles for ages with both the Explorer and
>> then
>> when I'd been using phpFlickr instead the setToken method.
>>
>> Hans,
>> Very sorry, one more thing I should have added if you're doing all this
>> with
>> phpFlickr (Aral, if you're updating your docs, please add this too). Once
>> you've got your api key and secret, before you go to getToken.php, in
>> Flickr
>> you should also update the Callback URL field for the relevant key in
>> Flickr
>> here. You'll need to click 'edit details', then you'll find it near the
>> bottom
>> http://www.flickr.com/services/api/keys/
>>
>> Put the address for your copy of auth.php (not sure if it'll work with
>> your
>> localhost address). Then when getToken goes to Flickr it knows where to
>> validate against for your secret and key and thus knows you're okay to
>> proceed.
>>
>> Not really sure about the authGetFrob.
>>
>> Cheerio for now,
>>
>> Aidann
>>
>>
>>
>> =========================
>> Thanks for telling about auth.php and getToken.php in the phpFlickr
>> library .
>> After adding my api key and shared secret and browsing to:
>> http://localhost/swx/php/lib/phpFlickr/getToken.php
>> I get redirected to the url entered when signing up at Flickr followed
>> by a frob, looking something like:
>> http://mysite.com/?frob=7215576083917047-896834e23f0049f-14877455&extra=%2Fswx%2Fphp%2Flib%2FphpFlickr%2FgetToken.php
>>
>> Recognising this and perhaps know the solution?
>>
>> Since the subject of this thread is spot on I continue the token hunt...
>> I'm trying to use the authentication protocol descibed in method
>> authGetFrob() in Flickr.php
>> authGetFrob() works fine and returns a frob
>> authGetUrl(frob) works fine and returns an url which when pasted
>> into a browser takes me to my Flickr acount where I'm asked to accept
>> that my application uses Flickr.
>> authGetToken(frob) shows in SWX Data Analyser: message=Invalid Frob
>> code=108 error=true
>>
>> I'm using the same frob returned from authGetFrob() which seemed to be
>> OK since authGetUrl(frob) is working.
>>
>> Any ideas?
>>
>> /Hans
>>
>>
>>
>> _______________________________________________
>> swx mailing list
>> swx at osflash.org
>> http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>>
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>> _______________________________________________
>> swx mailing list
>> swx at osflash.org
>> http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>>
>
>
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
>
>
More information about the swx
mailing list