• Resolved 11whyohwhy15

    (@11whyohwhy15)


    Hi,

    1 year, 4 months ago I had a problem with IPGB and you fixed it with the code below:

    <?php

    /**************************************
    CHILD THEME ENQUEUE STYLES
    ***************************************/

    add_action( ‘wp_enqueue_scripts’, ‘child_theme_enqueue_styles’ );

    if (!function_exists(“child_theme_enqueue_styles”)) { function child_theme_enqueue_styles() {
    wp_enqueue_style( ‘canon-parent-style’, get_template_directory_uri() . ‘/style.css’, array(‘canon-normalize’) );
    }
    }

    /**************************************
    IP Geo Block Snippet
    ***************************************/
    if (class_exists(‘IP_Geo_Block’)) {

    function my_bypass_admins( $queries ) {
    $whitelist = array(
    ‘handle_canon_options_advanced’,
    );
    return array_merge( $queries, $whitelist );
    }
    add_filter( ‘ip-geo-block-bypass-admins’, ‘my_bypass_admins’ );
    }

    However, since the new update the instagram carousel does not appear on my page anymore ? Just an error… I’ve had to deactivate IPGB so it works again…

    Any ideas ?

    Thanks

    Ian

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi Ian,

    The error message on your site must be:

    ERROR(400): Missing client_id or access_token URL parameter.

    This error was due to the authorization error between your server and instagram api server.

    c.f. https://www.instagram.com/developer/endpoints/

    So even if you deactivate IPGB, the error may not be solved. It means that the direct cause of your issue is not related to IPGB.

    However, since the new update the instagram carousel does not appear on my page anymore ? Just an error…

    Do you mean something related to the instagram carousel has been updated recently?

    When I googled “Missing client_id or access_token URL parameter.”, I found 2 sites that have the same message on their site. One uses theme Belle.

    And another uses theme Enoki.

    Both themes are made by ThemeCanon. So I think you need to ask support to your theme developer.

    Regarding to the filter hook ip-geo-block-bypass-admins, it should still work. But when you configure the authorization information for instagram on your theme option page, and if it failed to receive your secret token from the instagram server because of the blocking behavior of IPGB, then something may be wrong with IPGB.

    In this case, once you deactivate IPGB, you can get a valid token from the instagram server. After that, you can activate IPGB again. If this is the case for you, please let me know.

    c.f. https://www.instagram.com/developer/authentication/

    Good luck!

    • This reply was modified 7 years, 2 months ago by tokkonopapa.
    Thread Starter 11whyohwhy15

    (@11whyohwhy15)

    Hi,

    It was IPGB as I just checked the site and it is working fine, except I forgot to delete the cache and also cloudflare cache so it was still showing the old pages as it was before I deactivated IPGB and got a new token yesterday.

    https://drive.google.com/open?id=0B8rWFX3hEanRXzBpSVlCdl82X2s

    IPGB is deactivated.

    Thanks

    Ian

    Thread Starter 11whyohwhy15

    (@11whyohwhy15)

    Oh, Forgot to say this is the error I got:

    “error_type”:”OAuthParameterException”,”code”:400,”error_message”:”Missing client_id or access_token URL parameter.”

    And it happened at STEP 2 link where you simply click the link to authorize your site/client with Instagram…

    But when I deactivated IPGB it worked fine and generated a token and said your site is now authorized to interact with Instagram…

    I generated a new Client Secret and kept the same ID…

    Thanks

    • This reply was modified 7 years, 2 months ago by 11whyohwhy15.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi Ian,

    Thanks for the information.

    And it happened at STEP 2 link where you simply click the link to authorize your site/client with Instagram…

    But when I deactivated IPGB it worked fine and generated a token and said your site is now authorized to interact with Instagram…

    Regarding to the above, I’d like to you to see the logs in IPGB, because “Step Two: Receive the redirect from Instagram” says that:

    Once a user authorizes your application, we issue a redirect to your redirect_uri with a code parameter to use in step three.

    https://your-redirect-uri?code=CODE

    I’m not sure about the meaning “issue a redirect to your redirect_uri“, but I assume the instagram server would access to the above URL using GET method. If so, you can find the above request in your logs. In this case, you need to add the IP address of the instagram server into “Whitelist of extra IP addresses prior to country code“.

    Thank you for your cooperation!

    Thread Starter 11whyohwhy15

    (@11whyohwhy15)

    Hi,

    I have reactivated IPGB and instagram carousel authorisation appears to be working ????? It’s all very strange….

    My questions would have been why would I need to add instagram authorisation IP to whitelist when it didn’t need it before ?

    And how would I find which IP is the one for instagram as there are no defining details when I click the little +sign after each IP block… I would be looking in the logs/admin area ?

    Can you check on your end by looking at my page https://www.whodoido.com that it is working for you too…

    Thanks

    Ian

    • This reply was modified 7 years, 2 months ago by 11whyohwhy15.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi,

    I have reactivated IPGB and instagram carousel authorisation appears to be working ????? It’s all very strange….

    Really? I’m very confused!

    Anyway, as I don’t have any experience with instagram, I should register my account and investigate how authentication would work.

    OK, I would like to close this topic if can have your agree.

    Thanks.

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Oh, I have one thing I should mention.

    Now you can put handle_canon_options_advanced into the textfield in “Exceptions” at “Admin ajax/post” like following instead of adding snippet into your functions.php:

    Admin exceptions

    Please refer to “3.0.2 Release Note” if you are interested in.

    Strictly speaking, the code snippet in your functions.php and the above exceptions are not the same. But I recommend it.

    Thanks.

    Thread Starter 11whyohwhy15

    (@11whyohwhy15)

    Hi,

    So do I just delete the code you first gave me that I put into the functions.php: after putting code into the textfield in “Exceptions” …

    Yes you can close this as it is working now:

    This is the link when you first fixed the problem:

    https://www.ads-software.com/support/topic/instagram-authorization-1/

    Thanks

    Ian

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi Ian,

    So do I just delete the code you first gave me that I put into the functions.php:

    Yes.

    But I should describe more detail about the difference between using filter hook “ip-geo-block-bypass-admins” and putting action name into “Exceptions” at “Admin ajax/post” for you and all the users.

    1. ip-geo-block-bypass-admins is for just bypass WP-ZEP. It does not affect “Block by country“.

    2. “Exceptions” will bypass WP-ZEP when you enable “Prevent Zero-day Exploit” but does not bypass “Block by country” (same as 1.) And it will bypass “Block by country” when you enable only “Block by country“.

    In your case, I think 2. should be OK.

    Anyway, thank for the link. I hope it may help someone!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Instagram Authorization’ is closed to new replies.