WordPress.org

Ready to get started?Download WordPress

Forums

Yakadanda Instagram
Not Connected (17 posts)

  1. tej1602
    Member
    Posted 9 months ago #

    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/

  2. giavara
    Member
    Posted 7 months ago #

    Same problem!

  3. nativewanderlust
    Member
    Posted 7 months ago #

    same problem

  4. Souscaf
    Member
    Posted 7 months ago #

    idem

  5. Teguh
    Member
    Posted 7 months ago #

    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

  6. Souscaf
    Member
    Posted 7 months ago #

    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

  7. Souscaf
    Member
    Posted 6 months ago #

    still no solution to this problem .. and no response, yet the first post date there two months :(

  8. edluvables
    Member
    Posted 6 months ago #

    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!!

  9. nativewanderlust
    Member
    Posted 6 months ago #

    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.

  10. Teguh
    Member
    Posted 6 months ago #

    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

  11. Teguh
    Member
    Posted 6 months ago #

    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 */
    ...
    
  12. Christian Kramer
    Member
    Posted 5 months ago #

    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

  13. Christian Kramer
    Member
    Posted 4 months ago #

    Did anyone have found a solution?

  14. nick.exile
    Member
    Posted 4 months ago #

    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
        )
  15. morajau
    Member
    Posted 2 months ago #

    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!

  16. pinballw
    Member
    Posted 1 month ago #

    @morajau
    You rock! Totally the solution that worked for me.

  17. katruskan
    Member
    Posted 3 weeks ago #

    Hi! I have the same problem. What could be the corrupted characters you are talking about? There's only one website link in my biography.

Reply

You must log in to post.

About this Plugin

About this Topic