# Hasan Yüksektepe
[![Linkedin Badge](https://img.shields.io/badge/linkedin-%230077B5.svg?&style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/hasan-yuksektepe/)
[![Twitter Badge](https://img.shields.io/badge/twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/Hasokeyk)
[![Github Badge](https://img.shields.io/badge/github-333?style=for-the-badge&logo=github&logoColor=white)](https://github.com/alihandemirdas)
![Visitor Badge](https://visitor-badge.laobi.icu/badge?page_id=hasokeyk.instagram&left_text=Download)
## About Project
This project is made in PHP library of all instagram mobile app features. This
library can send exactly same queries like mobile app
and returns server responses.
## Getting Started
Please read carefully.
### Requirements
- You must have to "composer" application on your PC. For
installation https://getcomposer.org/download/
- PHP 7.4 or above
### File permissions
Give permission to the following files and folders with chmod 777.
`/vendor/hasokeyk/`
## Setup via Composer
* you must determine your root(working) folder after that open console (
terminal )
```sh
composer require hasokeyk/instagram
```
## Installing via download Repository
1. Firsty download repository
```sh
git clone https://github.com/hasokeyk/instagram.git
```
2. Use the command below to download the required libraries.
```sh
composer install
```
## Examples
# Login
You must login before each operation. In your first login operation, the system
will be cached and your operation will run faster.
```php
login->login();
if($login){
echo 'Login success';
}else{
echo 'Login Fail';
}
//LOGIN CONTROL
$login_control = $instagram->login->login_control();
if($login_control){
echo 'Login True';
}else{
echo 'Login False';
}
//LOGIN CONTROL
```
# Two factor authorization
In your first login attemp, if two factor authorization are enabled, instagram
will send you a code. If you enter the code into the input area, yout login
operation will be completed automatically.
After your next logins, if yout IP is not changed, you can login without asking
code.
```php
login->two_factor_login($code, $token);
print_r($two_factor_login);
}else{
$login = $instagram->login->login();
if(isset($login->two_factor_identifier) and !empty($login->two_factor_identifier)){
echo <<
END;
}
else if($instagram->login->login_control()){
echo 'Login Success';
}
else{
echo 'Login Fail';
}
}
```
# Getting user posts
When you run the below code, you will get last 50 posts of user you are logged
into.
If you want another accounts posts get_user_posts('hasokeyk') please use this.
```php
login->login_control();
if($login){
$user_posts = $instagram->user->get_user_posts();
print_r($user_posts);
}else{
echo 'Login Fail';
}
```
## Contributors
Asım Murat YILMAZ - [GITHUB](https://github.com/asiminnesli)
## License
You can download and use it as long as this project is under development. If
used for other purposes
The person who wrote the codes is not responsible. By downloading and using this
project, you agree to this.
## Contact
Hasan Yüksektepe - [INSTAGRAM](https://instagram.com/hasokeyk)
Website : [https://hayatikodla.net](https://hayatikodla.net)
[contributors-shield]: https://img.shields.io/github/contributors/hasokeyk/instagram.svg?style=for-the-badge
[contributors-url]: https://github.com/hasokeyk/instagram/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/hasokeyk/instagram.svg?style=for-the-badge
[forks-url]: https://github.com/hasokeyk/instagram/network/members
[stars-shield]: https://img.shields.io/github/stars/hasokeyk/instagram.svg?style=for-the-badge
[stars-url]: https://github.com/hasokeyk/instagram/stargazers
[issues-shield]: https://img.shields.io/github/issues/hasokeyk/instagram.svg?style=for-the-badge
[issues-url]: https://github.com/hasokeyk/instagram/issues
[license-shield]: https://img.shields.io/github/license/hasokeyk/instagram.svg?style=for-the-badge
[license-url]: https://github.com/Hasokeyk/instagram/blob/main/LICENSE
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/hasan-yuksektepe/
[instagram-shield]: https://img.shields.io/badge/-Instagram-black.svg?style=for-the-badge&logo=Instagram&colorB=555
[instagram-url]: https://instagram.com/hasokeyk/