Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8706349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:35:34+00:00 2026-06-13T03:35:34+00:00

I used weibo oauth api in magento for connect user with weibo. But now

  • 0

I used weibo oauth api in magento for connect user with weibo.

But now weibo is broken and it completely get token but display error
when we retrieve user data using authentication token.error is as follows..

i am using this code the use can successfully login but after that there is an error like this

[error_code] => 401
[error] => 40109:consumer_key_refused!

my code is here for after login\

$c = new WeiboClient( WB_AKEY , WB_SKEY , $_SESSION['last_key']['oauth_token'] ,       $_SESSION['last_key']['oauth_token_secret'] );
    $ms  = $c->home_timeline(); 
    $me = $c->verify_credentials();
    $ms  = $c->show_user($userid);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:35:35+00:00Added an answer on June 13, 2026 at 3:35 am

    I found weibo new oauth2.0 authentication api that solve my problem.Use this if any one have problem in weibo user authentication..

    Weibo-Oauth2 and follow Application scenarios step.

    For get access token,you need to use form POST method instead of GET.so you use this code.

    $opts = array('http' =>
                array(
                        'method'  => 'POST',
                        'header'  => "Content-Type: text/xml\r\n"                       
                )
        );
    
    $context  = stream_context_create($opts);
    
    $uri= 'https://api.weibo.com/oauth2/access_token?client_id='.WB_AKEY.'&client_secret='.WB_SKEY.'&grant_type=authorization_code&redirect_uri='.YOUR_REGISTERED_REDIRECT_URI.'&code='your authorization code;
    
    $authkey1 = file_get_contents($uri,false,$context);
    
    $decoded_auth1 = json_decode($authkey1,true);
    

    And use this url to get authenticate user data..

    $userinfo = file_get_contents("https://api.weibo.com/2/users/show.json?access_token=".$access_token."&uid=".$userid);
    $decoded_userinfo = json_decode($userinfo, true);
    

    Hope this help to anyone..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i used the user's valid access token to identify the user... with this: https://graph.facebook.com/me?fields=id&access_token=VALID_ACCESS_TOKEN
I used the following code to display a rich list. import net.rim.device.api.ui.*; import net.rim.device.api.ui.container.*;
Used Arrayadapter to display elements on listview which are stored in a database. Now
I used the phonegap website to create an IPA file. Now I want to
Having used storyboards for a while now I have found them extremely useful however,
i used this code, but this codes only removes the duplicates on the list
It used to work just fine. Not sure what has changed, i get this
I used the below code to do the aove task: Dim Arr(2,150) Arr(0)=objsheet.Range(B16:B225).Value But
used to check user input like username not a login account.
Used to develop Portlets and JPS's, so have a dilemma. task: display <h:dataTable> only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.