Closed (fixed)
Project:
Instagram Block
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2014 at 08:14 UTC
Updated:
26 Nov 2014 at 11:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yanniboi commentedYour problem is that you are not getting any images back from instagram.
Could you post what configuration you are using? If you would rather not post your auth key on a public forum feel free to send it to me via the Contact form on my user account page: ( https://drupal.org/user/1837556/contact ).
Also when you used the configuration link to get your auth key from instagram.yanniboi.com, did you see your instagram posts in the left sidebar?
Comment #2
yanniboi commentedUpdated the Issue Summary.
Comment #3
yanniboi commentedOk, after checking the user id and auth key you sent me, I have had a quick look.
Good news, they work on my machine so your details are fine.
Next step is to check server configuration. First thing that pops to mind would be do you have the php curl module installed? If not, the path on #2164857: Move the Instagram request to OOP removes the php-curl dependency so you could try applying that patch and see if that helps.
Another thing you could do to help me find out what is wrong is go to the page where you are getting the error, and then looking in your site's error log and see if anything else is triggering errors (yoursite.com/admin/reports/dblog).
Comment #4
timtk commentedok this is strange. I was testing this on localhost and live site earlier and it did not work on either. Now it's showing images on the the live site.
Might have been staring at the screen for too long. :(
Working all fine now.
I know this is a separate issue, but is there a way to include the images in a carousel to scroll through?
Once again thanks for the prompt response.
Comment #5
yanniboi commentedSorry not at present.
Comment #6
auworks commentedHey yanniboi,
I encountered the same error and found I wasn't getting any response from instagram API. I looked into the code and found that it was making a request to api using SSL. I added curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); and it all started working...
Cheers,
Ash
Comment #7
yanniboi commentedThanks for posting @ashishupadhayay.
Would you mind making a patch and posting it here? That way if anyone else has a similar problem they can just use your code.
I probably won't be committing it though because in the next release I will probably move away from curl and towards http requests.
Comment #8
auworks commentedNo worries. Will do...
Comment #9
jchin1968 commented#6 worked for me. Here's the patch for it.
Comment #10
yanniboi commentedHey @jchin1968 thanks a lot for the patch, however unfortunately it doesn't apply any more.
instagram_block has moved on and now uses a request class and uses drupal_http_request rather than curl.
( see http://cgit.drupalcode.org/instagram_block/tree/instagram_block.lib.php line 76)
If someone could download and try the latest commit of 7.x-1.x and tell me if that fixes the problem, then I would be happy to release 7.x-1.1 for you.
Comment #11
Anonymous (not verified) commentedHi,
also having this exact same problem. Patch didn't do anything. Am using latest version and Instagram login details haven't changed from when it used to work!
The biggest issue is not the missing block, but the nasty error report being presented to everyone. That would be my #1 prio to get rid of that. I added in a
if(isset($result->data)) {...} around the for loop at line 131 to supress this. You can see how many sites have this problem by googling the error message!
thanks
Rich
Comment #12
carsonwI was running into this same issue and realized that instead of entering my Instagram numeric ID at admin/config/content/instagram_block which is 1469147088, I was entering my login id (thepanhandleilc).
*smacks forehead*
Comment #13
breezeweb commentedI made another dumb mistake which caused me a lot of grief trying to track down, due to the cryptic error message.
When copying and pasting the Access Code hash from the Authorization Request, there was an extra space at the end that kept getting copied over, which I didn't notice at first. Once I fixed that it of course worked fine.
Hope that helps someone else.
Comment #14
brightbold#13 solved it for me, thanks.
Comment #15
TomasComsolvia commented#13 solved it for me also! Maybe add stripslashes() or similar so this won't happen again? ;)
Comment #16
yanniboi commented#2256333: Account Number/Access Token fields allow spaces which I just committed solves the space problem by trim()-ing whitespace when the access token and user id are saved.