Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal server error #357

Closed
zubairsultan786 opened this issue Apr 22, 2018 · 7 comments
Closed

500 Internal server error #357

zubairsultan786 opened this issue Apr 22, 2018 · 7 comments

Comments

@zubairsultan786
Copy link

zubairsultan786 commented Apr 22, 2018

Hi,
I am working on instagram stories. it's work but sometimes it will gives error internal server error. I don't know why it's happening. Can you please help me out?
Here is my code:
`
$instagram = \InstagramScraper\Instagram::withCredentials('xxxx', 'xxxxx');

        $instagram->login();
 	
        //$instagram->login();
        $username = $_POST['username'];
	$account = $instagram->getAccount($username);
       // $account = $instagram->getMedias($username);
       //echo '<pre>';
       //print_r($account);
      // echo '</pre>';
       // die;
        $id[] = $account->getid();
	
        $stories = $instagram->getStories($id);
      	if(!empty($stories)){
      		$storySlides = $stories[0]->getstories();
        	$count = count($storySlides);
      	}
      	else{
      		$msg = 'No new stories. <a href="https://www.xxxxx.com/download-instagram-stories/">Click here to see other user stories</a>';
      	}
    `
@zubairsultan786
Copy link
Author

Now every times it give error internal server error. Anyone help me please

@pgrimaud
Copy link
Contributor

@zubairsultan786 What error do you have?

@zubairsultan786
Copy link
Author

zubairsultan786 commented Apr 26, 2018

@pgrimaud when I execute my code it shows like that. I think the error is in getStories function
error_web
"

@pgrimaud
Copy link
Contributor

@zubairsultan786 Show php errors by adding this 2 lines in your code :

ini_set('display_errors', 1);
error_reporting(E_ALL);

@andrewaolwatson
Copy link

andrewaolwatson commented Apr 27, 2018

Problem solved after updating to latest version

@pgrimaud
Copy link
Contributor

@andrewaolwatson nice!
@zubairsultan786 you can close the issue 😀

@raiym raiym closed this as completed Apr 27, 2018
@zubairsultan786
Copy link
Author

@andrewaolwatson hey!! which files i have to update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants