Title: Not Connected
Last modified: August 21, 2016

---

# Not Connected

 *  [tej1602](https://wordpress.org/support/users/tej1602/)
 * (@tej1602)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/not-connected-2/)
 * On the Settings page it tells me the ‘Connection to Instagram Succeeded’, but
   then it still says Not Connected next to the Client ID. I have it set to display
   in my sidebar but once again it says Not Connected. Where am I going wrong?
 * [https://wordpress.org/plugins/yakadanda-instagram/](https://wordpress.org/plugins/yakadanda-instagram/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/not-connected-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/not-connected-2/page/2/?output_format=md)

 *  [giavara](https://wordpress.org/support/users/giavara/)
 * (@giavara)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976043)
 * Same problem!
 *  [nativewanderlust](https://wordpress.org/support/users/nativewanderlust/)
 * (@nativewanderlust)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976048)
 * same problem
 *  [Souscaf](https://wordpress.org/support/users/souscaf/)
 * (@souscaf)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976049)
 * idem
 *  [Teguh](https://wordpress.org/support/users/teguhpratama/)
 * (@teguhpratama)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976050)
 * Strange 🙂 , I have no problem at all. Try to reset and connect again. And make
   sure OAuth redirect_uri is `http://your-site.am/wp-admin/admin.php?page=yinstagram/
   settings.php`
 *  [Souscaf](https://wordpress.org/support/users/souscaf/)
 * (@souscaf)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976051)
 * I have reset and connect several time, the OAuth redirect_uri is good, I deactivated
   all other plugins and tried with all the default wordpress themes, but I still
   have the same problem, conflicting messages :
    “Connection to Instagram succeeded.”
   and “Not Connected.”
 * You can see [this capture](http://liondorstmalo.com/capture-yinstagram.jpg)
 *  [Souscaf](https://wordpress.org/support/users/souscaf/)
 * (@souscaf)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976057)
 * still no solution to this problem .. and no response, yet the first post date
   there two months 🙁
 *  [edluvables](https://wordpress.org/support/users/edluvables/)
 * (@edluvables)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976060)
 * I hate forum posts that say “same here” because they never solve a problem, but…
   same here. I created an app, input the ID and Secret, and got the Not Connected
   error even though it said success. OAuth is correct.
    Plz halp!!
 *  [nativewanderlust](https://wordpress.org/support/users/nativewanderlust/)
 * (@nativewanderlust)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976061)
 * By adding input we hope to possibly increase the urgency, if any, of solving 
   the issue. Devs seem to be more inclined to work a multi user problem as opposed
   to single, and if you don’t have anything different going on other than what’s
   in the OPs post, same here is sufficient IMO. I hope it is solved soon, this 
   plugin looked promising, just adding my 2¢ in case it helps you help another 
   person.
 *  [Teguh](https://wordpress.org/support/users/teguhpratama/)
 * (@teguhpratama)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976062)
 * hmmm… let’s try this, I’m just curious
 * on `/wp-content/plugins/yakadandada-instagram/admin/page-settings.php`
 * add this code (after line-3)
 *     ```
       <?php if (!function_exists('curl_version')): ?>
         <div class="error">
           <p>Please enable cURL.</p>
         </div>
       <?php endif; ?>
       ```
   
 * So it will look like
 *     ```
       <div class="wrap">
         <div id="icon-edit" class="icon32 icon32-posts-quote"></div>
         <h2>Settings</h2>
         <?php if (!function_exists('curl_version')): ?>
           <div class="error">
             <p>Please enable cURL.</p>
           </div>
         <?php endif; ?>
         <?php if ($message): ?>
           <div class="<?php echo $message['class']; ?>">
         ...
       ```
   
 * then open your settings page -> `http://your-site.am/wp-admin/admin.php?page=
   yinstagram/settings.php`
 * if no red message go to next step below
 *  [Teguh](https://wordpress.org/support/users/teguhpratama/)
 * (@teguhpratama)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976063)
 * Add this code to `/wp-content/plugins/yakadandada-instagram/admin/functions.php`(
   after line-377, or last line)
 *     ```
       function yi_get_access_token($code) {
         $data = yinstagram_get_options('settings');
   
         // Get cURL resource
         $curl = curl_init();
         // Set some options - we are passing in a useragent too here
         curl_setopt_array($curl, array(
           CURLOPT_RETURNTRANSFER => 1,
           CURLOPT_URL => 'https://api.instagram.com/oauth/access_token',
           CURLOPT_USERAGENT => 'Access Token Request',
           CURLOPT_POST => 1,
           CURLOPT_POSTFIELDS => array(
             'client_id' => $data['client_id'],
             'client_secret' => $data['client_secret'],
             'grant_type' => 'authorization_code',
             'redirect_uri' => admin_url('admin.php?page=yinstagram/settings.php'),
             'code' => $code
           )
         ));
         // Send the request & save response to $resp
         $resp = curl_exec($curl);
         // Close request to clear up some resources
         curl_close($curl);
         return $resp;
       }
       ```
   
 * still on `/wp-content/plugins/yakadandada-instagram/admin/functions.php` add 
   this code (on line-149)
 *     ```
       $message = maybe_serialize(array('cookie' => 1, 'class' => 'error', 'msg' => 'Connection to Instagram failed.'));
       $response = json_decode( yi_get_access_token($_GET['code']) );
       if ( isset($response->access_token) ) {
         update_option('yinstagram_access_token', $response);
         $message = maybe_serialize(array('cookie' => 1, 'class' => 'updated', 'msg' => 'Connection to Instagram succeeded.'));
       }
       ```
   
 * so it will look like
 *     ```
       ...
       } else {
         $message = maybe_serialize(array('cookie' => 1, 'class' => 'error', 'msg' => $response['errors']['http_request_failed'][0]));
       }
   
       $message = maybe_serialize(array('cookie' => 1, 'class' => 'error', 'msg' => 'Connection to Instagram failed.'));
       $response = json_decode( yi_get_access_token($_GET['code']) );
       if ( isset($response->access_token) ) {
         update_option('yinstagram_access_token', $response);
         $message = maybe_serialize(array('cookie' => 1, 'class' => 'updated', 'msg' => 'Connection to Instagram succeeded.'));
       }
   
       setcookie('yinstagram_response', $message, time()+1, '/');
       wp_redirect(admin_url('admin.php?page=yinstagram/settings.php')); exit;
       }
       /* end of authentication */
       ...
       ```
   
 *  [Christian](https://wordpress.org/support/users/christiankramer/)
 * (@christiankramer)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976069)
 * Hi,
 * i saw you pasted the solution above into a new version. But it doesn’t work. 
   The same message: “not connected”.
 * Any other tipp?
 * Regards,
    CK
 *  [Christian](https://wordpress.org/support/users/christiankramer/)
 * (@christiankramer)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976073)
 * Did anyone have found a solution?
 *  [nick.exile](https://wordpress.org/support/users/nickexile/)
 * (@nickexile)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976074)
 * After a good 6 hours of being infuriated, I found my way into the rabbit hole,
   and found me a real error message! Problems with an SSL. Whose SSL do you ask?
   Mine. Well thats funny, my site doesnt have a SSL Cert.
 * So, I went into the admin/functions.php file and changed the following all I 
   did was add CURLOPT_SSL_VERIFYPEER => 0, to not validate the SSL.:
 *     ```
       // Set some options - we are passing in a useragent too here
         curl_setopt_array($curl, array(
           CURLOPT_RETURNTRANSFER => 1,
           CURLOPT_URL => 'https://api.instagram.com/oauth/access_token',
           CURLOPT_USERAGENT => 'Yakadanda Instagram Access Token Request',
           CURLOPT_POST => 1,
           CURLOPT_POSTFIELDS => array(
             'client_id' => $data['client_id'],
             'client_secret' => $data['client_secret'],
             'grant_type' => 'authorization_code',
             'redirect_uri' => admin_url('admin.php?page=yinstagram/settings.php'),
             'code' => $code
           )
       ```
   
 *  to
 *     ```
       // Set some options - we are passing in a useragent too here
         curl_setopt_array($curl, array(
           CURLOPT_SSL_VERIFYPEER => 0,
           CURLOPT_RETURNTRANSFER => 1,
           CURLOPT_URL => 'https://api.instagram.com/oauth/access_token',
           CURLOPT_USERAGENT => 'Yakadanda Instagram Access Token Request',
           CURLOPT_POST => 1,
           CURLOPT_POSTFIELDS => array(
             'client_id' => $data['client_id'],
             'client_secret' => $data['client_secret'],
             'grant_type' => 'authorization_code',
             'redirect_uri' => admin_url('admin.php?page=yinstagram/settings.php'),
             'code' => $code
           )
       ```
   
 *  [morajau](https://wordpress.org/support/users/morajau/)
 * (@morajau)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976077)
 * I think i found a solution.
    The plugin worked for my personal instagram account
   but it didn’t work on a client account i was working on. So i checked his profile
   and realized that on his Biography there were some corrupted characters, i just
   deleted those characters and it worked!
 *  [pinballw](https://wordpress.org/support/users/pinballw/)
 * (@pinballw)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/not-connected-2/#post-4976079)
 * [@morajau](https://wordpress.org/support/users/morajau/)
    You rock! Totally the
   solution that worked for me.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/not-connected-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/not-connected-2/page/2/?output_format=md)

The topic ‘Not Connected’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yakadanda-instagram_4799b5.svg)
 * [Yakadanda Instagram](https://wordpress.org/plugins/yakadanda-instagram/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yakadanda-instagram/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yakadanda-instagram/)
 * [Active Topics](https://wordpress.org/support/plugin/yakadanda-instagram/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yakadanda-instagram/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yakadanda-instagram/reviews/)

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [Pictures](https://wordpress.org/support/topic-tag/pictures/)

 * 18 replies
 * 13 participants
 * Last reply from: [Moises Rebolledo](https://wordpress.org/support/users/moisesreb/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/not-connected-2/page/2/#post-4976083)
 * Status: not resolved