<?php
use MetzWeb\Instagram\Instagram as InstagramAlias;
$instagram = new InstagramAlias(array(
'apiKey' => 'YOUR_APP_KEY',
'apiSecret' => 'YOUR_APP_SECRET',
'apiCallback' => 'YOUR_APP_CALLBACK'
));
echo "<a href='{$instagram->getLoginUrl()}'>Login with Instagram</a>";
[我在make时用作曲家添加了库
use MetzWeb\Instagram\Instagram
它看到了,但是当我开始编写代码时,它说没有名为instagram的类
Fatal error: Uncaught Error: Class 'MetzWeb\Instagram\Instagram' not found in C:\Users\Zera\İnstagram\Insta.php:4 Stack trace: #0 {main} thrown in C:\Users\Zera\İnstagram\Insta.php on line 4
我解决了。
即使您使用“ use ......”添加库,也需要制作
require "the source path of the class"