aboutsummaryrefslogtreecommitdiff
path: root/lib/phpFlickr/auth.php
diff options
context:
space:
mode:
authorGreg Froese <greg.froese@gmail.com>2009-10-08 04:38:19 +0000
committerGreg Froese <greg.froese@gmail.com>2009-10-08 04:38:19 +0000
commit24f3f2f0d304254451c46a3b28a8e1f4678bc02f (patch)
treec95dc02130267e6c2d7053faf7546089c1c744b1 /lib/phpFlickr/auth.php
parent6b00bdba17af611726eb950fb51758556694e80f (diff)
downloadelgg-24f3f2f0d304254451c46a3b28a8e1f4678bc02f.tar.gz
elgg-24f3f2f0d304254451c46a3b28a8e1f4678bc02f.tar.bz2
flickr integration
Diffstat (limited to 'lib/phpFlickr/auth.php')
-rw-r--r--lib/phpFlickr/auth.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/phpFlickr/auth.php b/lib/phpFlickr/auth.php
new file mode 100644
index 000000000..d272d49bf
--- /dev/null
+++ b/lib/phpFlickr/auth.php
@@ -0,0 +1,37 @@
+<?php
+ /* Last updated with phpFlickr 1.3.1
+ *
+ * Edit these variables to reflect the values you need. $default_redirect
+ * and $permissions are only important if you are linking here instead of
+ * using phpFlickr::auth() from another page or if you set the remember_uri
+ * argument to false.
+ */
+ $api_key = "26b2abba37182aca62fe0eb2c7782050";
+ $api_secret = "475e45cc580334da";
+ $default_redirect = "/";
+ $permissions = "read";
+ $path_to_phpFlickr_class = "./";
+
+ ob_start();
+ require_once($path_to_phpFlickr_class . "phpFlickr.php");
+ unset($_SESSION['phpFlickr_auth_token']);
+
+ if (!empty($_GET['extra'])) {
+ $redirect = $_GET['extra'];
+ }
+
+ $f = new phpFlickr($api_key, $api_secret);
+
+ if (empty($_GET['frob'])) {
+ $f->auth($permissions, false);
+ } else {
+ $f->auth_getToken($_GET['frob']);
+ }
+
+ if (empty($redirect)) {
+ header("Location: " . $default_redirect);
+ } else {
+ header("Location: " . $redirect);
+ }
+
+?> \ No newline at end of file