Comments (4)
Thanks for trying out this fork! :) It's nice to know it's possibly of use.
I've not yet got to converting photosets.getPhotos to the new class layout, but the old style should work:
$phpFlickr->photosets_getPhotos(72657638907952846)
Do you get any error with that?
from phpflickr.
I don't seem to get any error or any results!
It's a bit tricky because it's all tied together inside the flogr wrappers, so I've had to add the line
die(var_dump(PhpFlickr->photosets_getPhotos($photosetId)));
in the middle of the function that would usually be returning the set photos.
There's also an error suppression part to flogr, and so I've had to change the error suppression from only reporting E_ERROR
to E_WARNING
- as commenting it out completely caused nothing to work and still no errors to be thrown!
Anyway, when I do all of that, the page just abruptly ends mid-way through, the last line in the html is a tag, and nothing actually seems to die to the page...
It's been a while by the way - apologies if this was a daft way of getting the information we need - would it help if I shared the "Work In Progress" dropbox folder?
from phpflickr.
OK - so revisited this and started from scratch with a new project. Index.php ended up being as simple as:
$apiKey = '*****';
$apiSecret = '*****';
require_once 'vendor/autoload.php';
$flickr = new \Samwilson\PhpFlickr\PhpFlickr($apiKey, $apiSecret,true);
echo "<pre>";
#var_dump($flickr->photosets_getList('7394337@N06')); - originally here to check that the photo set ID was correct.
var_dump($flickr->photosets_getPhotos('72157638523485346'));
This results in outputting all the correct information for that particular set - but if I leave out the quote marks around the set ID it returns nothing. I figured maybe this was the problem I was having - the set IDs look like they're numbers - so I modified
public function photosets_getPhotos($photoset_id...
to
public function photosets_getPhotos(String $photoset_id
But then dumping out the photoset_id still gave me the "number-version" 7.2157638523485E+16 I'm at a loss as to how to correct this - but I'm not sure I'll need to...
Because I finally worked out what I was doing wrong in my post above! I changed the line added in the middle of the flogr function function get_set_photos
to match the function return:
die(var_dump($this->PhpFlickr->photosets_getPhotos(
$photosetId,
$extras ? $extras : 'original_format,date_taken,date_upload',
$privacyFliter,
$perPage ? $perPage : $this->paramPerPage,
$page ? $page : $this->paramPage)));
And this seems to dump out the photoset array in a seemingly suitable format, including an array of 98 photos (excerpt below). Has the results array changed in such a way that flogr might not be able to understand it in some way?
edit:
This seems to be processed by the function: $this->PhpFlickr->buildPhotoURL($photo, "thumbnail")
has this been implemented in such a way as to understand the "photo" arrays below?
array(2) {
--
| ["photoset"]=>
| array(11) {
| ["id"]=>
| string(17) "72157638523485346"
| ["primary"]=>
| string(11) "11296522014"
| ["owner"]=>
| string(11) "7394337@N06"
| ["ownername"]=>
| string(22) "Martin Klefas-Stennett"
| ["photo"]=>
| array(98) {
| [0]=>
| array(15) {
| ["id"]=>
| string(11) "11296522014"
| ["secret"]=>
| string(10) "982ce28b7f"
| ["server"]=>
| string(4) "5523"
| ["farm"]=>
| int(6)
| ["title"]=>
| string(8) "DSC_5553"
| ["isprimary"]=>
| string(1) "1"
| ["ispublic"]=>
| int(1)
| ["isfriend"]=>
| int(0)
| ["isfamily"]=>
| int(0)
| ["dateupload"]=>
| string(10) "1386623432"
| ["datetaken"]=>
| string(19) "2013-12-08 21:35:01"
| ["datetakengranularity"]=>
| string(1) "0"
| ["datetakenunknown"]=>
| int(0)
| ["originalsecret"]=>
| string(10) "5ef6ecd195"
| ["originalformat"]=>
| string(3) "jpg"
| }
| [1]=>
| array(15) {
| ["id"]=>
| string(11) "11296561153"
| ["secret"]=>
| string(10) "09a2c92002"
| ["server"]=>
| string(4) "3759"
| ["farm"]=>
| int(4)
| ["title"]=>
| string(8) "DSC_5554"
| ["isprimary"]=>
| string(1) "0"
| ["ispublic"]=>
| int(1)
| ["isfriend"]=>
| int(0)
| ["isfamily"]=>
| int(0)
| ["dateupload"]=>
| string(10) "1386623436"
| ["datetaken"]=>
| string(19) "2013-12-08 21:35:02"
| ["datetakengranularity"]=>
| string(1) "0"
| ["datetakenunknown"]=>
| int(0)
| ["originalsecret"]=>
| string(10) "8ff277ba30"
| ["originalformat"]=>
| string(3) "jpg"
| }
from phpflickr.
OK - sorry for the repeated posts - I now don't know if this is a change in this fork or a change implemented some time ago that has only come to light since my upgrade.
It seems that the returned photoset array used to contain an element ['photo']
at it's root - but this is now found at ['photoset']['photo']
. Changing references to this allows the set page to work properly.
from phpflickr.
Related Issues (20)
- Not Getting "oauth_verifier" From $flickr->getAuthUrl($perm, $callbackUrl); HOT 7
- New 6K display size support HOT 4
- Fatal error when trying to run get_auth_token.php in examples HOT 5
- Remove non-PSR6 caching
- Remove all deprecated methods in PhpFlickr HOT 2
- Switch from Travis to Github Actions HOT 1
- Add all missing API methods
- Too few arguments to function Samwilson\PhpFlickr\PhotosApi::search() HOT 2
- Session auth broken HOT 4
- dependency issue upgrading to Symfony 6.2 HOT 7
- Fix Phan suppressions
- delete returns oauth_problem=verifier_invalid HOT 3
- Add User Agent HOT 6
- Drop unsupported dependencies HOT 1
- ideas for next version: error handling and return types
- Allow User-Agent to be set in the constructor
- Help with web-based authentication HOT 2
- flickr-bundle for Symfony developers
- upload not setting privacy HOT 1
- Use live.staticflickr.com rather than farm*.staticflickr.com
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpflickr.