Python

Support » Plugin: Nextend Social Login & Register » An active sầu access token must be used lớn query information


Resolved
*
shukindigo

(

Hello.I have followed the steps that you have provided in the first reply found here : https://i-google-map.com/support/topic/rest-api-social-login-work-flow/

However I am getting the following error for facebook login:

An active access token must be used to lớn query information about the current user.

Bạn đang xem: Python

I have sầu checked the access token via https://graph.facebook.com/me?access_token=xxxxxxxxx & I got the name and ID information.

Using other demo access tokens (obtained via fb dev access token tool) also returned the aforementioned error.

I have sầu even tested via your thử nghiệm khung found here : https://gist.github.com/nextend/4d3c701c8d99972824025e4dfdeccac0 and again, it returned the same error.

Please help me on this.


Viewing 3 replies - 1 through 3 (of 3 total)
Plugin Support
*
Laszlo

(
laszloszalvak)


1 year, 3 months ago


Hi
shukindigo

If the access token is actually fine, then I assume your problem will be related to lớn the format you post it.I am not really sure but you are probably posting only the “access_token” value, but no the whole JSON encoded access token as I suggested here:https://i-google-map.com/support/topic/rest-api-social-login-work-flow/#post-12026347

If this is the problem, then please make sure, you JSON encode the whole access token what the provider returns, so it should look something like:"access_token":"xxxxxxxxx","token_type":"bearer","expires_in":5183946Here you can see an example for both the Facebook & Google access_token: https://gist.github.com/nextend/b733d402ee2e2cee59b632f6e4741a9d

Best regards,Laszlo.

Xem thêm: #1 : Tặng 345 Giftcode Tam Quốc Truyền Kỳ Mobile, Giftcode Tam Quốc Truyền Kỳ Mobile


Thread Starter
*
shukindigo

(
shukindigo)


1 year, 3 months ago


Hi.

I did actually posted the whole parameters in the json.

Also, I’ve tested with your test-form where there is text field for access token, still the problem persist. I got the same error.

Is it something lớn vị with any other setup?My i-google-map.com is located in a subdirectory, could it be a cause?


Plugin Support
*
Laszlo

(
laszloszalvak)


1 year, 3 months ago


Hi
shukindigo

i-google-map.com installations in subfolders should not cause such problem.But I assume something isn’t quite right with your access token. I just checked the thử nghiệm form, with the JSON encoded access_token token of the Facebook provider và the size worked fine for me, when there was a user registered with the posted access_token it returned the User ID fine.

Xem thêm: Nghĩa Của Từ Fa Có Nghĩa Là Gì ? Ý Nghĩa Và Các Kiểu Fa Trên Facebook Hay Gặp

What I would suggest you to:1.) Login to lớn your kiểm tra Facebook account, go to lớn Settings > Apps và Websites > find the App you are testing with then Remove it. This will revoke your access_token.2.) Once it is done, go to lớn your i-google-map.com site, delete the thử nghiệm i-google-map.com trương mục that your thử nghiệm Facebook trương mục is linked with. ( This is just khổng lồ make sure, your thử nghiệm i-google-map.com account is not linked with a Facebook trương mục over another Facebook App. )3.) Then you should register a new i-google-map.com tài khoản with your Facebook trương mục.4.) After that log out of the i-google-map.com trương mục.5.) xuất hiện this file:

wp-content/plugins/nextend-facebook-connect/includes/oauth2.php

find this code:$this->access_token_data = $accessTokenData;in the authenticate() function around line 144 and add this code after it:emang đến wp_json_encode($this->access_token_data);exit;6.) Try khổng lồ connect with the Facebook provider again. It will write out your access token.7.) Copy this access token and chạy thử it with the REST API chạy thử form.8.) If this works fine, then compare the structure of the working access token with the wrong access token.9.) Don’t forget khổng lồ remove sầu the custom code that writes out the access token, once you finished the debugging!

Anyway please note that we can not provide tư vấn for problems related to lớn custom coding, but hopefully this will help you in solving the problem.


Chuyên mục: Công nghệ