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

how to parse posts by hash tag? e.g. #phuket? #6

Open
ptflp opened this issue Apr 12, 2018 · 3 comments
Open

how to parse posts by hash tag? e.g. #phuket? #6

ptflp opened this issue Apr 12, 2018 · 3 comments

Comments

@ptflp
Copy link

ptflp commented Apr 12, 2018

How to parse posts data from instagram by hash tag? #phuket

@alexhoma
Copy link
Contributor

alexhoma commented Apr 12, 2018

Hi @ptflp!

As a quick example, create a file called tagsParser.php on your project root;

// require your autoloader if necessary
// require_once __DIR__ . '/vendor/autoload.php';

use Mineur\InstagramParser\Instagram;
use Mineur\InstagramParser\Model\InstagramPost;

$queryHash = '298b92c8d7cad703f7565aa892ede943';

Instagram::createTagParser($queryHash)
    ->parse('phuket', function(InstagramPost $post) {
        var_dump($post);
    }
);

To get your own $queryHash check https://github.com/mineur/instagram-parser/blob/master/docs/setup.md.

Then execute via console:

php tagsParser.php

For more examples check this https://github.com/mineur/instagram-parser/tree/master/examples.

Hope it helps :)

@alexhoma
Copy link
Contributor

Hi @ptflp it was useful? I'm about to close this issue

@ptflp
Copy link
Author

ptflp commented Apr 27, 2018

thank you very much! but now it shows 403 forbidden every query =(

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

No branches or pull requests

2 participants