Hello. Our Twitter widget has stopped working and as part of troubleshooting I’m trying to re-authenticate the relevant REST Resource OAuth Session asset with Twitter by going to its URL in the browser (as per https://matrix.squiz.net/manuals/web-services/chapters/rest-resource-assets#Example). However, I cannot get it to redirect to Twitter. I have a blank Design (printing only the body) applied to it, Redirect To Authorise is set to Yes, and the Call Back URL is set to the asset’s URL. I’ve tried to authenticate with the existing asset, as well as a newly created asset, to no avail.
Does anyone from Squiz have information on this issue? If it’s indeed a bug and there is no workaround, I’ll most likely have to rebuild the relevant bit of functionality in PHP. Many thanks.
Thanks. The issue seems to be that Matrix won’t redirect from the REST Resource OAuth Session asset to https://api.twitter.com/oauth/authorize in the browser in order that I can obtain an Access Token. I’ve tested setting up a Oauth2 Token and that does redirect. However, with that I keep getting a ‘there is no request token’ error.
Make sure the Rest Resource oAuth Session has public permission and live, and after authorization you will just get a blank white page (or depending on the design file set to this asset). Go back to the details screen of the Rest Resource oAuth Session and check if it has the Access Token. If yes, it means it has worked and therefore set the Store Access Token to Yes.
Now Create a Rest Resource JS asset and set the Auth type to oAuth and include the oAuth Session asset.
For quick test just use the example provided in the manual.