<p>Just downloaded FeedMe, and it seems like a great solution to what I want to do, but I can't get it to succesfully run a json import on a feed generated by instagram. When I hit 'Save and Continue', I get a PHP warning:</p>

<pre><code>file_get_contents(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
</code></pre>

<p>It's on this line: </p>

<pre><code> public function getRawData($url)
     {
     if (file_get_contents(__FILE__) &amp;&amp; ini_get('allow_url_fopen')) {
         $content = file_get_contents($url);
     } else if (function_exists('curl_version')) {
         $curl = curl_init();
         curl_setopt($curl, CURLOPT_URL, $url);
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
         $content = curl_exec($curl);
         curl_close($curl);
     }

     return ($content) ? $content : false;
 }
</code></pre>

<p>It's worth noting, I have no idea what to set the Primary Element as. Didn't see any documentation for JSON on the readme</p>

CC BY-SA 3.0
2015-05-06T22:08:46.430Z
You may not necessarily need to set the primary element for JSON feeds, it's more for XML feeds where there must be a root node. It's not explained very well I'll agree.
crawf
<json><feed><plugin-feedme>
Using FeedMe with the instagram API
# Using FeedMe with the instagram API

(Asked by: username_0 on 2015-05-06)

Just downloaded FeedMe, and it seems like a great solution to what I want to do, but I can't get it to succesfully run a json import on a feed generated by instagram. When I hit 'Save and Continue', I get a PHP warning:
file_get_contents(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known

It's on this line: 
 public function getRawData($url)
     {
     if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
         $content = file_get_contents($url);
     } else if (function_exists('curl_version')) {
         $curl = curl_init();
         curl_setopt($curl, CURLOPT_URL, $url);
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
         $content = curl_exec($curl);
         curl_close($curl);
     }

     return ($content) ? $content : false;
 }

It's worth noting, I have no idea what to set the Primary Element as. Didn't see any documentation for JSON on the readme

**Tags:** json, feed, plugin-feedme
> **Comments:**
> **username_1**: You may not necessarily need to set the primary element for JSON feeds, it's more for XML feeds where there must be a root node. It's not explained very well I'll agree.  

---

## 0 answers

