Title: Could not get access token error
Last modified: August 30, 2016

---

# Could not get access token error

 *  [ecwid_team](https://wordpress.org/support/users/ecwid_team/)
 * (@ecwid_team)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/)
 * Hello,
 * my name is Vera, I am support engineer at Ecwid. I’m writing to you regarding
   an issue with the “Facebook all” plugin.
 * Recently our customer reported a problem that he couldn’t connect his account
   in our plugin, Ecwid Shopping Cart: [https://wordpress.org/plugins/ecwid-shopping-cart/](https://wordpress.org/plugins/ecwid-shopping-cart/)
 * We investigated the issue and found out that he had the “Facebook all” plugin
   installed.
 * We discovered that the plugin reacts to each request containing “code” parameter
   in the query and launches its own authentication process regardless of which 
   page is opened in the WP admin, e.g. “[http://www.example.com/wp-admin/admin.php?page=myplugin&code=123&#8221](http://www.example.com/wp-admin/admin.php?page=myplugin&code=123&#8221);.
   This prevents the other plugins working with oAuth function properly. It even
   catches the “code” parameter when the frontend is opened e.g. “[http://www.example.com/?code=123&#8221](http://www.example.com/?code=123&#8221);
 * Can you please fix it on your side so that the other plugins utilizing oAuth 
   could work properly?
 * Thanks
 * [https://wordpress.org/plugins/facebookall/](https://wordpress.org/plugins/facebookall/)
 * The similar issue occurred with the “WP Facebook Auto Publish” plugin, we reported
   it here: [https://wordpress.org/support/topic/authentication-8](https://wordpress.org/support/topic/authentication-8)
   This issue is already fixed.
 * _[ [No bumping please](http://codex.wordpress.org/Forum_Welcome#No_Bumping). ]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [sourceaddons](https://wordpress.org/support/users/sourceaddons/)
 * (@sourceaddons)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421413)
 * Hi Matt,
    We can’t change this process cause we are using facebook graph api 
   which return “code” parameter to get access token so it’s redirect back with “
   code” params on site then we get work with that. please be more specific about
   your issue. so we can check and fix it.
 * Thanks
 *  [makfruit](https://wordpress.org/support/users/makfruit/)
 * (@makfruit)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421422)
 * Hi,
 * Thanks for getting back.
 * A ton of services out there use oAuth and thus, besides Ecwid and Facebook, there
   could be a lot of other plugin-“connectors” waiting for the “code” parameter 
   in the URL. However, they should not affect each other, right?
 * In our plugin, for example, we use a more specific return URL in the oAuth process
   to catch only those “codes” that were sent to our plugin and not affect the other
   plugins. E.g.: “wp-admin/admin-post.php?action=ecwid_oauth”. You can do the same–
   just specify a more specific redirect uri when you use FB oAuth and avoid catching
   the other plugins calls.
 * As we said above, the “WP Facebook Auto Publish” plugin had the same issue and
   they fixed it: [https://wordpress.org/support/topic/authentication-8](https://wordpress.org/support/topic/authentication-8).
   So, nothing should prevent you from fixing yours, I think.
 * Please let me know if I am wrong.
 * Thanks.
 *  [makfruit](https://wordpress.org/support/users/makfruit/)
 * (@makfruit)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421436)
 * Ho Sourceaddons,
 * Did you have a chance to look into the issue?
 *  [Ecwid by Lightspeed Ecommerce Shopping Cart](https://wordpress.org/support/users/ecwid/)
 * (@ecwid)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421449)
 * Hi guys,
 * This problem has not been addressed for a month already. Can you please look 
   into it?
 *  Plugin Author [sourceaddons](https://wordpress.org/support/users/sourceaddons/)
 * (@sourceaddons)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421450)
 * This is cause of you are also using “code” in query string like
 * **wp-admin/admin-post.php?action=ecwid_oauth&code=7dUVwtg8DfQ3NR9vV5TRGzPrp6npa7Yp**
 * Why you don’t using an unique query params. if any plugin which is using oauth
   with graph api all provider returning “code” params to check. i think you need
   to change and make it like “ecwid_oauth_code”.
 * If you want to change and update our plugin this will take time. cause we need
   to change plugin functionality. so it’s better to make your plugin to no conflict
   to other. If not agree let’s give us sometime to make compatible with yours.
 * Thanks
 *  [makfruit](https://wordpress.org/support/users/makfruit/)
 * (@makfruit)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421451)
 * Hi,
 * Thanks for the reply.
 * > Why you don’t using an unique query params.
 * I answered this in my comment above:
    [https://wordpress.org/support/topic/could-not-get-access-token-error?replies=5#post-7328242](https://wordpress.org/support/topic/could-not-get-access-token-error?replies=5#post-7328242)
 * The ‘code’ parameter is a part of the oAuth standard and is used by a lot of 
   applications and services including Faccebook, Ecwid, Twitter, Google and thousands
   of WordPress plugins. So, the point is that each plugin should make its oauth
   flow separated from the others by means of something else – renaming the code
   parameter thousand times doesn’t make sense.
 * In Ecwid plugin, to not conflict with the other plugins, we made the return URL
   specific for our plugin, so the plugin catches only those “codes” that were sent
   to our plugin and not affect the other plugins. In our case it looks like “wp-
   admin/admin-post.php?action=ecwid_oauth”. As you can see, the both your plugin
   and Ecwid use the ‘code’ parameter in URL, however Ecwid plugins doesn’t affect
   your while yours affects ours.
 * To not conflict with our plugin and with the other plugins using oAUth, you should
   fix it on your side – just specify a more specific redirect uri when you use 
   FB oAuth and avoid catching the other plugins calls.
 * Thanks.
 *  [makfruit](https://wordpress.org/support/users/makfruit/)
 * (@makfruit)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421456)
 * Hi guys,
 * Is there any updates on this issue?
    Do you have any ETA of the fix?
 *  [Ecwid by Lightspeed Ecommerce Shopping Cart](https://wordpress.org/support/users/ecwid/)
 * (@ecwid)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421462)
 * Hey there,
 * Did you look into it?
 *  [makfruit](https://wordpress.org/support/users/makfruit/)
 * (@makfruit)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421504)
 * Hi,
 * Can you provide a status of this issue?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Could not get access token error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/facebookall_3b5997.svg)
 * [Facebook All](https://wordpress.org/plugins/facebookall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/facebookall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/facebookall/)
 * [Active Topics](https://wordpress.org/support/plugin/facebookall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebookall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebookall/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [makfruit](https://wordpress.org/support/users/makfruit/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/could-not-get-access-token-error/#post-6421504)
 * Status: not resolved