Some questions about authorized login in Sina Weibo API

Source: Internet
Author: User
Some questions about authorized login in Sina Weibo API!
Recently to do a website, access Sina Weibo, the requirements of the integration is quite high!
Because there is no application to App_key, so I just look at the official demo

Because the website is an e-commerce type, there is Order system, so the SINA cooperation user login when my idea is to create a user account on my site and Sina Weibo login user binding, binding only one field, is the user's Sina Weibo id!

This involves me. To get the login user's Weibo ID, the Weibo license is successfully redirected to my site callback page

$o = new Weibooauth (Wb_akey, Wb_skey, $_session[' Keys '] [' Oauth_token '], $_session[' Keys ' [' Oauth_token_secret '] );

$last _key = $o->getaccesstoken ( $_request[' oauth_verifier ');

$_session[' last_key '] = $last _key;

This is the source of the callback page, the last obtained this $last_key and write to the session, this is an array, because I can not test, so I can not print to see if there is a login user's microblog ID in this array, and now my program is based on the array contains the micro-blog ID to do, So I'm afraid if the array does not contain the ID, then the site users can not and Sina Weibo login user binding!

who has done the PHP version of Sina Weibo access to help to say
Or if there is no Weibo ID, how can i get the login user's Sina Weibo id! when I go to the callback page?

Share to: more


------Solution--------------------
Landlord rest assured, callback inside you will be able to get Sina Weibo ID.

The $last _key is called access token, which contains user_id, if you use it to further call Verify_credentials (), you can also get screen_name/profile_image_url and so on.


————————————————————————————————
Based on the plugin extension function provided by CSDN forum, I have made a signature file tool to share with you, welcome technical exchange:)
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.