• Resolved Eilonwy926

    (@eilonwy926)


    I’m having a problem with Instagram authentication (Photonic v. 2.27).

    I got to the point where I clicked on my user profile, but then the next thing was this:

    error_type	"OAuthException"
    code	400
    error_message	"Invalid scope field(s): public_content"

    I never got to the page that is supposed to say “This plugin is requesting the following:”

    So, two questions:
    1. How do I fix this?
    2. How can I reset things if I want to try logging into a different IG account? Clicking the “Login and get Access Token” button now just goes directly to that error.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry, this is one instance where I have been caught napping ??

    Instagram has been making changes to its API and the removal of the public_content scope was one of the things it did. This requires a simple code fix and I will bundle it with the next release. Here is what you need to do:

    1. Go to the file, wp-content/plugins/photonic/extensions/Photonic_Instagram_Processor.php, line 17. You will see this:
      $this->scope = 'basic public_content';
    2. Change it to this:
      $this->scope = 'basic';
    3. Save the file and reattempt the authentication.
    Plugin Author Sayontan Sinha

    (@sayontan)

    To answer your second question, if you have already performed authentication successfully and you want to change your credentials, first log out of Instagram in the browser you are logged into. Then go through the authentication process on Photonic’s side. Hopefully the post above will help fix the authentication issue.

    Hi!
    I followed the directions above and it still doesn’t work for me. Any solutions?

    Plugin Author Sayontan Sinha

    (@sayontan)

    I see. In addition to the change you made, please try this as well:

    1. Go to wp-content/plugins/photonic/photonic-options-manager.php, lines 501-503. You will see this:
      echo "<a href='https://instagram.com/oauth/authorize/?client_id=f95ba49c90034990b8f5c7270c264fd3&scope=basic+public_content&redirect_uri=https://aquoid.com/photonic-router/?internal_uri=" .
      	admin_url('admin.php?page=photonic-auth') . "&response_type=token' class='button button-primary'>" .
      	esc_html__('Login and get Access Token', 'photonic') . "</a>";
    2. Please change it to:
      echo "<a href='https://instagram.com/oauth/authorize/?client_id=f95ba49c90034990b8f5c7270c264fd3&scope=basic&redirect_uri=https://aquoid.com/photonic-router/?internal_uri=" .
      	admin_url('admin.php?page=photonic-auth') . "&response_type=token' class='button button-primary'>" .
      	esc_html__('Login and get Access Token', 'photonic') . "</a>";
    3. Save and reattempt the authentication

    Please let me know if that helps.

    Thread Starter Eilonwy926

    (@eilonwy926)

    Yes, that works now.
    Thanks for your quick help, as always! ??

    Hi,

    I have updated the plugin this morning and notice the fixes mentioned above in the respective files.

    I have re-authorised Instagram but am still seeing ‘Connection Error – Check your token’ on my site.

    Plugin Author Sayontan Sinha

    (@sayontan)

    @dragnfly,
    Yes, the fixes on this thread were a part of release 2.28.

    I cannot replicate what you are getting with any of my sites, and that error message is not from Photonic. Can you please start a new thread and provide me with a URL there?

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