Sina Weibo error_code: 400; error: 40022: Error: Source paramter (appkey) is missing Solution
On Sina Weibo today, the error error_code: 400; error: 40022: Error: Source paramter (appkey) is missing appears in the API that calls statuses/public_timeline to obtain the latest public microblog messages, finally, the problem was solved. A statement "Source" => $ consumer-> key was missing,
Open the weibooauth. php file, which contains some code in more than 270 lines.
Public static function from_consumer_and_token ($ consumer, $ token, $ http_method, $ http_url, $ parameters = NULL) {<br/> @ $ parameters or $ parameters = array (); <br/> $ defaults = array ("Source" => $ consumer-> key, // This statement is missing, add <br/> "oauth_version" => oauthrequest: $ version, <br/> "oauth_nonce" => oauthrequest: generate_nonce (), <br/> "oauth_timestamp" => oauthrequest: generate_timestamp (), <br/> "oauth_consumer_key" => $ consumer-> key ); <br/> if ($ token) <br/> $ defaults ['oss _ token'] = $ token-> key; <br/> $ parameters = array_merge ($ defaults, $ parameters); <br/> return New oauthrequest ($ http_method, $ http_url, $ parameters); <br/>}