Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Instagram分页gow我可以修复吗_Php_Pagination_Call_Instagram - Fatal编程技术网

Php Instagram分页gow我可以修复吗

Php Instagram分页gow我可以修复吗,php,pagination,call,instagram,Php,Pagination,Call,Instagram,我的instagram分页有问题。我需要媒体/应用程序的代码。 我试过使用$jsonurl=“”””“$data->access_token。”“&count=2”,但没有返回任何内容。 提前谢谢 <?php session_start(); $data=$_SESSION['userdetails']; echo $data->access_token; if (isset($_REQUEST['next']) && isset($_SESSION['next'

我的instagram分页有问题。我需要媒体/应用程序的代码。 我试过使用$jsonurl=“”””“$data->access_token。”“&count=2”,但没有返回任何内容。 提前谢谢

<?php 
session_start(); 
$data=$_SESSION['userdetails'];
echo $data->access_token;
if (isset($_REQUEST['next']) && isset($_SESSION['next'])) 
$jsonurl = $_SESSION['next']; 
else 
$jsonurl = "https://api.instagram.com/v1/useers/self/media/liked?access_token='".$data-    >access_token."'&count=2"; 
$json = file_get_contents($jsonurl,0,null,null); 
$response = json_decode($json, true); 

$_SESSION['next'] = $response['pagination']['next_url']; 
?> 
<div class="photo"> 
<a href="<?= $link ?>"><span></span><img src="<?= $thumbnail ?>" title="<?= $text ?>" alt="<?= $text ?>" /></a> 
    <div class="metaz">via <?= $author ?> at <?echo date("h:i:s A 
\o\\n d/m/Y",$date);?></div> 
    <?= $text ?>

// Button code here: 
<a href="?next">next</a> 

经
//按钮代码如下:

您的url中有拼写错误:
/useers/
必须是
/users/

$jsonurl=”https://api.instagram.com/v1/useers/self/media/liked?access_token=““$data->access_-token.”&count=2”

需要:


$jsonurl=”https://api.instagram.com/v1/users/self/media/liked?access_token=““$data->access_-token.”&count=2”

此外,
->
需要附加为这样的
->
是的,请忽略->和用户我将代码放入wordpress页面…我有另一个代码,但结果只有20张照片…因此我需要分页。当我在纯php中尝试代码时,我收到错误。警告:获取文件内容…错误400错误请求