PHPackages                             survos/flickr-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. survos/flickr-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

survos/flickr-bundle
====================

Symfony bundle that wraps samwilson/phpflickr library

2.0.188(6mo ago)01.1kMITPHPPHP ^8.4

Since Jun 3Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/survos/flickr-bundle)[ Packagist](https://packagist.org/packages/survos/flickr-bundle)[ GitHub Sponsors](https://github.com/kbond)[ RSS](/packages/survos-flickr-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (32)Versions (503)Used By (0)

survos/flickr-bundle
====================

[](#survosflickr-bundle)

A Symfony bundle that wraps flickr library at

In addition to putting the api key and secret in environment variables, there are 2 twig functions that make getting the thumbnail and the photo page easy. Note that if you embed the thumbnail in a webpage, you are required (by their terms of service) to provide a link to the photo page on Flickr.

```
   {% set url = flickrThumbnailUrl(photo) %}

```

Installation
------------

[](#installation)

```
composer require survos/flickr-bundle
```

Flickr API keys
---------------

[](#flickr-api-keys)

There are 2 ways to use this bundle. The simplest is if you're only using it to access your own account. In that case, simply add the api keys to the environment.

The second is if your users can authenticate the flickr account and access their own photos. In this case, one easy way to store the keys is to add a FlickrUserTrait to the User class.

Demo App
--------

[](#demo-app)

```
symfony new flickr-demo --webapp && cd flickr-demo
composer config extra.symfony.allow-contrib true
cat > .env.local > assets/app.js

bin/console make:controller AppController -i
cat  src/Controller/AppController.php
