Extending the /me endpoint
-
Greetings,
I am still tinkering around to extend the /me endpoint.
I am trying to add avatar support.
However, when I send the code through, it gets jumbled up by the endpoint.
$usrImg = get_avatar_url($user); $usrImg2 = strstr($usrImg, '?s', true); $usrImg3 = trim($usrImg2, "//"); $usrImg_arr = array( "user_avatar" => $usrImg3); var_dump($usrImg3); $result3 = $result2 + $usrImg_arr; $response = new WPOAuth2\Response($result3); //$me_data //$result //$result4 $response->send();expected result: http://www.gravatar.com/avatar/xxxxxxxxxxxxxxxxxx
actual result: http://www.gravatar.com\/avatar\/xxxxxxxxxxxxxxxxxxI have done everything I could think of to trim, replace, and otherwise pass this through. I keep getting that wonky string in the endpoint. Which makes me believe this is being done with the beautification methods, but I am clueless how to side-step it.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Extending the /me endpoint’ is closed to new replies.