The example.php doesnt work
Closed this issue · 6 comments
Return Blank page in browser !
Note: I configured Flickr API probably and phpflckr.php is in correct path
Hey, I also installed api correctly and get correct frob. And then if I call auth_getToken function, there's no token registered.
Do I have to pre-install something?
Example isn't working because it's buggy - seems like developers didn't test it :)
So, instead of "foreach ($recent['photo'] as $photo) {" in line 17 you should have
foreach ($recent['photos']['photo'] as $photo) {
I keep getting a blank page as well when trying the example.. Tried suggestion by playcat and still nothing, any other ideas?
Just try by adding or replacing these lines of code in phpFlickr.php -> function post()
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $this->rest_endpoint);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
this is what I tried and worked well.
still a blank page. solution of asrin475 didnot work
asrin475 did work for me. I was able to successfully retrieve the access token and upload image as well.