In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to solve the problem of missing parameter errorcode 102error prompted by Tencent Weibo". In daily operation, I believe many people have doubts about how to solve the problem of missing parameter errorcode 102prompted by Tencent Weibo. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the problem of "how to solve the wrong problem of Tencent Weibo prompting missing parameter errorcode 102". Next, please follow the editor to study!
The specific analysis is as follows:
Today, when debugging the interface of Tencent Weibo, there was an error. I found no relevant information on the Internet, and finally I transferred it myself, so I posted this article to prevent you phper from making wheels repeatedly.
Error message, the code is as follows:
The copy code is as follows:
StdClass Object
(
[data] = >
[detailerrinfo] = > stdClass Object
(
[accesstoken] = >
[apiname] = > www.jb51.net
[appkey] = > 801485800
[clientip] = > 112.193.138.133
[cmd] = > 0
[proctime] = > 0
[ret1] = > 3
[ret2] = > 3
[ret3] = > 102
[ret4] = > 3659629834
[timestamp] = > 1394436892
)
[errcode] = > 102
[msg] = > missing parameter
[ret] = > 3
[seqid] = > 1394436894
)
In the official information of Tencent Weibo open platform, no development document was found to explain this error code 102. after comparing with Tencent Weibo PHP SDK, it was found that one parameter was missing.
Solution to error code 102:
Oauth_version is required in the parameters that request user data, and in OAuth3, its value must be 2. A.
In the request parameters, the OAuth3 section should include:
The field indicates the ipoauth_version version number of the openidclientip client obtained by the accesstokenopenid authorization obtained by the oauth_consumer_keyappkeyaccess_token authorization, which must be the 2.ascope request permission range (default "all")
Drupal Tencent Weibo login instance code:
The copy code is as follows:
$http = drupal_http_request (url ('https://open.t.qq.com/api/user/info', array)
'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 field, you need to re-authorize from the login page, otherwise there will be an error "check sign error" error code 36.
The following signature error return value caused by repeatedly refreshing the API, the code is as follows:
The copy code is as follows:
StdClass Object
(
[data] = >
[detailerrinfo] = > stdClass Object
(
[accesstoken] = >
[apiname] = > weibo.user.info
[appkey] = > 801485800
[clientip] = > 112.193.138.133
[cmd] = > 0
[proctime] = > 0
[ret1] = > 3
[ret2] = > 3
[ret3] = > 36
[ret4] = > 2636350730
[timestamp] = > 1394437225
)
[errcode] = > 36
[msg] = > check sign error
[ret] = > 3
[seqid] = > 1394437227
)
Obtain the user data of Tencent Weibo and the field description of the returned value of API user/info of the personal data of the currently logged-in user, as follows:
The copy code is as follows:
{
Errcode: error code is returned
Msg: error messa
Ret: return value, 0-success, non-0-failed
Data:
{
Birth_day: the day of birth
Birth_month: month of birth
Birth_year: year of birth
City_code: urban id
Comp:
{
Begin_year: the first year
Company_name: company name
Department_name: Department name
End_year: end year
Id: company id
}
Country_code: national id
Edu: educational information
{
Departmentid: Department id
Id: educational Information record id
Level: education level
Schoolid: school id
Year: enter the school year
}
Fansnum: listeners
Favnum: number of collectibles
Head: avatar url
Homecity_code: home city id
Homecountry_code: home country id
Homepage: personal home page
Homeprovince_code: id of hometown province
Hometown_code: id, the town where the hometown is located
Idolnum: number of listeners
Industry_code: industry id
Introduction: personal introduction
Isent: whether it is an enterprise organization
Ismyblack: whether it is on the blacklist of the current user, 0-No, 1-Yes
Ismyfans: whether it is the audience of the current user, 0-No, 1-Yes
Ismyidol: whether it is the idol of current users, 0-No, 1-Yes
Isrealname: whether it is verified by real name, 1-verified, 2-not verified
Isvip: whether to authenticate the user, 0-No, 1-Yes
Location: location
Mutual_fans_num: the number of listening friends
Name: user account name
Nick: user nickname
Openid: user's unique id, corresponding to name
Province_code: regional id
Regtime: registration time
Send_private_flag: whether everyone is allowed to send private messages to current users, 0-only idols, 1-celebrities + listeners, 2-all
Sex: user gender, 1-male, 2-female, 0-not filled in
Tag: label
{
Id: personal tag id
Name: label signature
}
Tweetinfo: the latest original Weibo message
{
City_code: city code
Country_code: country code
Emotiontype: mood type
Emotionurl: mood picture url
From: source
Fromurl: source url
Geo: geolocation information
Id: the only id of Weibo
Image: picture url list
Latitude: latitude
Location: where the publisher is located
Longitude: longitude
Music: audio information
{
Author: singer
Url: audio addr
Title: audio name, song title
}
Origtext: original content
Province_code: province code
Self: did you send your own Weibo? 0-No, 1-Yes
Status: Weibo status, 0-normal, 1-system deletion, 2-auditing, 3-user deletion, 4-root deletion
Text: Weibo content
Timestamp: server timestamp, which cannot be used to turn pages
Type: Weibo type, 1-original post, 2-reprint, 3-private message, 4-reply, 5-empty reply, 6-reference, 7-comment
Video: video information
{
Picurl: thumbnail
Player: player address
Realurl: original address of the video
Shorturl: short url of video
Title: video title
}
}
Tweetnum: number of Weibo published
Verifyinfo: authentication information
Exp: empirical valu
Level: Weibo rating
}
Seqid: serial number
}
The rest is very easy to deal with the logic business of your own program part.
At this point, the study on "how to solve the error of missing parameter errorcode 102 prompted by Tencent Weibo" is over. I hope I can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.