


Tencent Weibo prompts missing parameter errorcode 102 error solution, parametererrorcode_PHP tutorial
Tencent Weibo prompts missing parameter errorcode 102 error solution, parametererrorcode
The example in this article describes the solution to the missing parameter errorcode 102 error prompted by Tencent Weibo. Share it with everyone for your reference. The specific analysis is as follows:
When debugging the Tencent Weibo interface today, an error occurred. There was no relevant information on the Internet. I finally adjusted it myself, so I published this article to avoid phpers from reinventing the wheel.
Error message, the code is as follows:
(
[data] =>
[detailerrinfo] => stdClass Object
(
[accesstoken] => [Apiname] = & GT; www.jb51.net
[appkey] => [clientip] => 112.193.138.133
[cmd] => [proctime] => 0
[ret1] => 3
[ret2] => 3
[ret3] => 102
[ret4] => [Timestamp] = & GT; 1394436892
)
[errcode] => 102
[msg] => missing parameter
[ret] => 3
[seqid] => 1394436894
)
In the official information of Tencent Weibo Open Platform, no development document explaining this error code 102 was found. After comparing with Tencent Weibo PHP SDK, it was found that one parameter was missing.
How to solve error code 102:
oauth_version is required in the parameter requesting user information, and in OAuth2, its value must be 2.a.
In the request parameters, the OAuth2 part must include:
Drupal Tencent Weibo login example code:
'query' => array(
'access_token' => $access_token,
'oauth_consumer_key' => $provider['key'],
'openid' => $_GET['openid'],
'clientip' => ip_address(),
'scope' => 'all',
'seqid' => REQUEST_TIME,
'serverip' => $_SERVER['SERVER_ADDR'],
'oauth_version' => '2.a',
//'appfrom' => 'php-sdk2.0beta',
),
)));
Note: After adding the fields, you need to re-authorize from the login page, otherwise the error "check sign error" will appear. Error code 36.
The following signature error return value caused by repeated refresh of the interface, the code is as follows:
(
[data] =>
[detailerrinfo] => stdClass Object
(
[accesstoken] => [apiname] => weibo.user.info
[appkey] => [clientip] => [cmd] => 0
[proctime] => 0
[ret1] => 3
[ret2] => 3
[ret3] => 36
[ret4] => 2636350730
[timestamp] => )
[errcode] => 36
[msg] => check sign error
[ret] => 3
[seqid] => 1394437227
)
Obtain Tencent Weibo user information and obtain the personal information of the currently logged in user. Field description of the return value of the user/info interface, the code is as follows:
Copy code
errcode: return error code,
msg: error message,
ret: return value, 0-success, non-0-failure,
data:
{
birth_day: day of birth,
birth_month: birth month,
birth_year : year of birth,
city_code: city id,
comp :
{
begin_year : starting year,
company_name: company name,
department_name: department name,
end_year: end year,
id: company id
},
country_code: country id,
edu : Educational information
{
departmentid: department id,
id: education information record id,
level: academic level,
schoolid: school id,
year : year of admission
},
fansnum: Number of listeners,
favnum: number of collections,
head: avatar url,
homecity_code: hometown city id,
homecountry_code: home country id,
homepage: personal homepage,
homeprovince_code: home province id,
hometown_code: hometown town id,
idolnum: Number of people listening,
industry_code: industry id,
introduction: personal introduction,
isent: whether it is a corporate organization,
ismyblack: Whether it is in the current user’s blacklist, 0-no, 1-yes,
ismyfans: Whether it is the current user’s audience, 0-no, 1-yes,
ismyidol: whether it is the idol of the current user, 0-no, 1-yes,
isrealname: Whether to use real-name authentication, 1-real-name authentication, 2-not real-name authentication,
isvip: whether to authenticate the user, 0-no, 1-yes,
location : location,
mutual_fans_num: Number of mutual listening friends,
name : user account name,
nick: User nickname,
openid: user’s unique id, corresponding to name,
province_code: region id,
regtime: registration time,
send_private_flag: Whether to allow everyone to send private messages to the current user, 0-only idols, 1-celebrities + listeners, 2-everyone,
sex: User gender, 1-male, 2-female, 0-not filled in,
tag : tag
{
id: personal tag id,
name: tag name
},
tweetinfo : The most recent original Weibo message
{
city_code: city code,
Country_code: country code,
emotiontype : emotion type,
emotionurl: mood picture url,
From : source,
fromurl: source url,
geo : geographical location information,
id: Weibo’s unique id,
Image: Image URL list,
latitude : latitude,
Location: The location of the publisher,
longitude : longitude,
music : audio information
{
Author : singer,
url: audio address,
Title: Audio name, song title
},
origtext : original content,
province_code: province code,
Self: Whether the Weibo is posted by oneself, 0-no, 1-yes,
Status: Weibo status, 0-normal, 1-system deleted, 2-under review, 3-user deleted, 4-root deleted,
text: Weibo content,
timestamp: server timestamp, cannot be used for page turning,
Type: Weibo type, 1-original post, 2-reprint, 3-private message, 4-reply, 5-blank reply, 6-mention, 7-comment,
video : video information
{
Picurl: thumbnail,
Player: player address,
realurl: video original address,
Shorturl: the short url of the video,
Title: video title
}
},
tweetnum: Number of Weibo posts published,
verifyinfo: certification information,
exp: experience value,
level: Weibo level
},
seqid: serial number
}
The rest is very easy, handle the logic business of your own program part.
I hope this article will be helpful to everyone’s PHP programming design.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The default style of the Bootstrap list can be removed with CSS override. Use more specific CSS rules and selectors, follow the "proximity principle" and "weight principle", overriding the Bootstrap default style. To avoid style conflicts, more targeted selectors can be used. If the override is unsuccessful, adjust the weight of the custom CSS. At the same time, pay attention to performance optimization, avoid overuse of !important, and write concise and efficient CSS code.

Solutions to the garbled code of Bootstrap Table when using AJAX to obtain data from the server: 1. Set the correct character encoding of the server-side code (such as UTF-8). 2. Set the request header in the AJAX request and specify the accepted character encoding (Accept-Charset). 3. Use the "unescape" converter of the Bootstrap Table to decode the escaped HTML entity into original characters.

The main reasons why you cannot log in to MySQL as root are permission problems, configuration file errors, password inconsistent, socket file problems, or firewall interception. The solution includes: check whether the bind-address parameter in the configuration file is configured correctly. Check whether the root user permissions have been modified or deleted and reset. Verify that the password is accurate, including case and special characters. Check socket file permission settings and paths. Check that the firewall blocks connections to the MySQL server.

The solution to MySQL installation error is: 1. Carefully check the system environment to ensure that the MySQL dependency library requirements are met. Different operating systems and version requirements are different; 2. Carefully read the error message and take corresponding measures according to prompts (such as missing library files or insufficient permissions), such as installing dependencies or using sudo commands; 3. If necessary, try to install the source code and carefully check the compilation log, but this requires a certain amount of Linux knowledge and experience. The key to ultimately solving the problem is to carefully check the system environment and error information, and refer to the official documents.

Export default in Vue reveals: Default export, import the entire module at one time, without specifying a name. Components are converted into modules at compile time, and available modules are packaged through the build tool. It can be combined with named exports and export other content, such as constants or functions. Frequently asked questions include circular dependencies, path errors, and build errors, requiring careful examination of the code and import statements. Best practices include code segmentation, readability, and component reuse.

The following steps can be used to resolve the problem that Navicat cannot connect to the database: Check the server connection, make sure the server is running, address and port correctly, and the firewall allows connections. Verify the login information and confirm that the user name, password and permissions are correct. Check network connections and troubleshoot network problems such as router or firewall failures. Disable SSL connections, which may not be supported by some servers. Check the database version to make sure the Navicat version is compatible with the target database. Adjust the connection timeout, and for remote or slower connections, increase the connection timeout timeout. Other workarounds, if the above steps are not working, you can try restarting the software, using a different connection driver, or consulting the database administrator or official Navicat support.

The main reasons for MySQL installation failure are: 1. Permission issues, you need to run as an administrator or use the sudo command; 2. Dependencies are missing, and you need to install relevant development packages; 3. Port conflicts, you need to close the program that occupies port 3306 or modify the configuration file; 4. The installation package is corrupt, you need to download and verify the integrity; 5. The environment variable is incorrectly configured, and the environment variables must be correctly configured according to the operating system. Solve these problems and carefully check each step to successfully install MySQL.

There are many reasons why MySQL startup fails, and it can be diagnosed by checking the error log. Common causes include port conflicts (check port occupancy and modify configuration), permission issues (check service running user permissions), configuration file errors (check parameter settings), data directory corruption (restore data or rebuild table space), InnoDB table space issues (check ibdata1 files), plug-in loading failure (check error log). When solving problems, you should analyze them based on the error log, find the root cause of the problem, and develop the habit of backing up data regularly to prevent and solve problems.
