这是一场令人沮丧的斗争,但是我如何才能提取已经通过身份验证的IG用户的媒体?
我什至不知道如何正确开始,这是我到目前为止所掌握的:
<?php
$page_id = get_page_id('home');
try {
// Returns a `FacebookFacebookResponse` object
$response = $fb->get(
'/178**********933?fields=media',
'{access-token}'
);
} catch(FacebookExceptionsFacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(FacebookExceptionsFacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
?>
<div class="inner">
<header>
<h1 class="duo-title"><a href="">Instagram</a></h1>
</header>
<div class="feature-window">
<article>
<h1>
<a href="">
<!-- Loop Instagram media -->
<img src="" width="190" />
</a>
</h1>
<p>Lorem Ipsum.</p>
</article>
<p class="section-link viewmore">
<a href="">View More</a>
</p>
</div>
</div>