php - Yii2 Auth Client Extension for Tumblr -
I'm trying to use the OH client extension in Yii2 (). I have copied the Twitter Oath Client class that came with YiiFramework and made its own Tumbler version. Twitter works fine, but when I use my Tumblr version, I get an error on the screen "Is it OK to access all your data and post it in your account? Are you *** * Are logged in as *****. "(Tumblr oauth page)
There is an error: Failed with the request code: 401, Message: oauth_signature does not match expected value
Here's my Tumblr authentication client code:
Use yii \ authclient \ OAuth1; / ** * * Example Application Configuration: * * ~~~ * 'component' = & gt; [* 'AuthClientCollection' = & gt; [* 'Class' = & gt; 'Yii \ authclient \ Archiving', * 'Customer' = & gt; [* 'Tumbler' = & gt; [* 'Class' = & gt; 'yii \ authclient \ clients \ Tumblr', * 'Consumerkey' = & gt; 'Tumblr_consumer_key', * 'consumerSecret' = & gt; 'Tumblr_consumer_secret', *], *], *] * ... * * ~~~ * * / class tumbler provides OAuth1 {/ ** * @HerHitDock * / public $ authUrl = ''; / ** * @herherokak * / public $ requestTokenUrl = ''; / ** * @herherokak * / public $ requestTrack method = 'post'; / ** * @HerHitDOCK * / public $ accessTokenUrl = ''; / ** * @reherococco * / public $ accessto = 'GET'; / ** * @Herch Dock * / Public $ apiBaseUrl = ''; } You might want to try out I have used Google and the Facebook version in Yii2 and it works fine. Names Place yii \ authclient \ clients;
/ ** * @HerHitDock * / Protected function init user properties () {return $ this- & gt; API ('/ user / notification', 'gET'); } / ** * @HerHitDock * / Protected Works Default Name () {Return 'tumblr'; } / ** * @HyartDock * / Protected Function Default Tilt () {Return 'Tumbler'; }
Comments
Post a Comment