ammarbrohi / instagram-php Goto Github PK
View Code? Open in Web Editor NEWInstagram PHP API with Laravel Support - Unofficial
License: Other
Instagram PHP API with Laravel Support - Unofficial
License: Other
Thanks for share this script, It's awesome...
2FA work fine in cms script but I have problem with 2FA in wab...
can you show me any simple example that how to work or handle input post in php script for web?
thank! :)
you are awesome
one question how can i upload video in igtv?
whats the diffrence between this repository and adrifkat instagram?
When using the command getInfoByName($username), "Throttled by Instagram because of too many API requests." I see the error. There is no blocking when I log into the account and do the same. Where is the problem?
There is a challenge problem with Instagram. I tried with many different proxy but nothing change.(In two factor authentication methods SMS, Backup Codes...) I deleted the session folder, but no luck. Everything, it gives an error of "Challenge required". I verify that it was me on my Instagram, but when running the script I get the same error.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use InstagramAPI\Instagram;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('home');
}
public function test(Request $request){
if($request->get('code')){
$code = $request->get('code');
}
$username = "*****";
$password = "*****";
// Set allow dangerous
Instagram::$allowDangerousWebUsageAtMyOwnRisk = true;
$debug = false;
$ig = new Instagram($debug, false);
// Set proxy
$ig->setProxy('**PROXY ADRESS**');
try {
$loginResponse = $ig->login($username, $password);
print_r($loginResponse);
if ($loginResponse !== null && $loginResponse->isTwoFactorRequired()) {
$twoFactorIdentifier = $loginResponse->getTwoFactorInfo()->getTwoFactorIdentifier();
//
// // The "STDIN" lets you paste the code via terminal for testing.
// // You should replace this line with the logic you want.
// // The verification code will be sent by Instagram via SMS.
// $verificationCode = trim(fgets(STDIN));
// $verificationCode = trim($code);
print_r($ig->finishTwoFactorLogin($username, $password, $twoFactorIdentifier, strval($code), '2'));
// }
}
} catch (\Exception $e) {
echo $e->getMessage();
}
}
}
InstagramAPI\Response\LoginResponse: Challenge required.User not logged in. Please call login() and then try again.
codes works on my local computer but when i upload it in live vps in another country when the package try to login it catch the checkpoint error.im assume its because the instagram account is occasionally login from different country(ip) than login from vps ip.
anyway i searched and found the method
$ig->setProxy('');
can anybody help me how to use it if it is the solution?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.