phpFlickr
Did a couple of web pages using phpFlickr a long while back but after Flickr tightened its security and changed how it’s API could be used to authorize access to an user’s account, all those pages were broken. I had forgotten them until they re-surfaced during my recent move to another hosting account.
Here is my a page for ‘Interestingness’ and here are my ‘Subscribed Groups’.
These pages are made using phpFlickr and Lightbox (not sure if there are Wordpress plugins for them) but installation is fairly straightforward. The authorization had to be done to obtain a token not previously required – as I am viewing my own account, I have simply authenticated these web pages to one specific account so that all visitors will be able to views those pictures (if access to other user accounts were required, they would need to go through the authentication process as detailed in phpFlickr’s documentation).
To step thro’ the authentication process I had taken:
- Make a request to Flickr for an API key.
- Under API Key Authentication Setup in Flickr, complete the last row by pointing the URL to the location of the callback script
(auth.php)supplied with phpFlickr. - Open
auth.php and getToken.phpin an editor and fill out the ‘API key’ and ‘Secret’ - Point the browser to
'getToken.php'to get the token string from Flickr. - Finally, paste the token in the web pages to enable access to my account by inserting:
$api_key = "[your api key]";
$api_secret = "[your api secret]";
$f->setToken("[token string]");
Discussion Area - Leave a Comment