postaddictme / instagram-php-scraper

Get account information, photos, videos, stories and comments.
https://packagist.org/packages/raiym/instagram-php-scraper
MIT License
3.1k stars 800 forks source link

Instagram::getMediaCommentsByCode() returning 405 #46

Closed alejoxps closed 7 years ago

alejoxps commented 7 years ago

Hello - this method is now returning 405 errors with the example provied. Any idea? Thanks!

joseflorido commented 7 years ago

Hi, I am seeing the same problem. getMediaCommentsByCode returns 405 error is on src/InstagramScraper/Instagram.php on line 347

Any idea how to solve it? Thanks!

vinogradov-vadi commented 7 years ago

405 means method not allowed(GET) Use POST

joseflorido commented 7 years ago

Thanks, but isn't that something that should be changed in the API itself?

joseflorido commented 7 years ago

I did try to change request method to post on Instagram.php:339 but now I am getting a 403. Was someone able to get around this issue? Maybe we need a new endpoint to get comments?

Thanks!

raiym commented 7 years ago

@joseflorido I will release fix soon

raiym commented 7 years ago

I have released fix for this issue

joseflorido commented 7 years ago

Thanks @raiym, @Bolandish!

It's working again.

alejoxps commented 7 years ago

Thanks everyone!

levicosta201 commented 6 years ago

I'm having the following error

InstagramScraper\Exception\InstagramException thrown with message "Response code is 403. Body: Something went wrong. Please report issue."

C:\xampp\htdocs\instagram_api\instagram\vendor\raiym\instagram-php-scraper\src\InstagramScraper\Instagram.php Line 603