Answer the question
In order to leave comments, you need to log in
phpFlickr
Either it’s not my day, or in the internet, detailed information on this class really fell.
Found a bunch of examples how to show images. But I could not find a normal example and description for downloading.
It is necessary to upload an image (not local) and get a link to it.
I tried it myself, but it didn't work. It gives out "Oops! The API key or signature is invalid." then “Oops! Flickr can't find a valid callback URL.".
Help someone who has done this. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Show your code. Should be something like:
$f = new phpFlickr("key","secret");
$f->setToken("token");
$f->auth("write");
$upload_photo_id = $f->sync_upload($filePhotoName);
Everything is described here . Including there is a link to a ready-made PHP system for work and their API.
Svyatov, the same thing, but there is no line:
$f->setToken("token");
Where can I get a token?
Ufff, I also racked my brains a little to figure it out, in general, everything is tricky here :)
1) CallbackUrl is indicated on the pages with your application http://www.flickr.com/services/apps/by/...
here you need to select the application, then in the right menu, find the admin item, and select edit, then the edit page will open and you will see the CallbackUrl there (somehow it seemed complicated to me).
2) Let's go to the code. To do something, we need to authorize our application in the code require_once("phpFlickr.php");
$f = new phpFlickr($apikey, $secret);
$f->auth("write");
after that, you will need to follow the link, allow the application to perform the necessary operations, and then go to your callbackurl, but with a token. Something like http://test.ru/?frob=your_token
3) We take the same token from the URL
and do the following
require_once("phpFlickr.php");
$f = new phpFlickr($apikey, $secret);
$f->setToken($token);
$f->sync_upload("test.jpg", $title = "the title", $description = "the description", $tags = "tag1,tag2");
It seems to work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question