Twitter REST Resource OAuth Session not showing OAuth Access Token or Secret after Twitter app authorised


(Stuart W) #1

Hi,

 

As it would seem others have, I am struggling to set up a Twitter feed using the REST Resource OAuth asset and Twitter API v.1.1. Using the standard Twitter feed widget is simply not an option as it is horrible and I can't style it to match in with the site!

 

I have set up an app in Twitter, setting the access level to Read and write, callback URL to the url of the OAuth session asset (http://beta.yorkshiredales.org.uk/twitter-feed/ydnpa-twitter-oauth).

 

I have created the OAuth asset, copying in the Consumer Key, Consumer Secret and all of the various URLs for the Twitter app, added the URL of the OAuth asset for the Call Back URL and set Redirect to Authorise to 'Yes'. Have also used a blank design for the OAuth asset - the design just contains a body tag.

 

As per the Matrix user manual, I have then viewed the OAuth asset in the frontend - the Twitter authorisation screen has then appeared. I logged in with my Twitter log in and have been forwarded to the OAuth page - it actually displays as a blank page.

 

On going back to the OAuth asset details page, I should, according to the user manual, see the OAuth Access Token and Token Secret displayed on the page. This is not so - I just see the word 'none'.

 

I have tried refreshing the page, releasing and acquiring locks again, logging in and out of Matrix, but still no tokens on the details page. I have tried giving public users read, write and admin permission to the OAuth asset, but again, still no access token displayed.

 

Interestingly, I have gone back to the details for the page in the Twitter Developers site and it still says that the app hasn't been authorised and the access token hasn't been created yet. It definitely has been authorised, as it appears in my list of apps in the Twitter account!

 

Can anyone point me in the right direction please? Are there any settings in the Twitter app that I should have set that will stop Matrix picking up the tokens? Similarly, are there any settings within our Matrix installation that would stop the OAuth asset picking up the tokens? Could any firewall settings on the server stop the tokens getting through? I know of at least one other user of the Matrix installation that I am using who has had problems setting up the OAuth Twitter feed, so it could be local to us.

 

Thanks

 

Stu


(Nic Hubbard) #2

Hey Stuart,

 

Since you are on 4.14.3 I am pretty sure this won't work. I tried to setup this exact thing for South Downs and I seem to remember that it was a bug that was fixed in a later version of Matrix. We ended up just using the embedded Twitter widget.


(Tom Chadwin) #3

At the risk of jumping into this uninformed, would it be possible to examine the HTTP response from Twitter (using browser dev tools or something like Fiddler2) to see the OAuth Access Token and Token Secret? Is the missing response going to the client browser or the Matrix server?

 

Tom


(Bart Banda) #4

When you do the Oauth process and you get redirected back to Matrix from Twitter, try doing it both when having the locks on the token asset, and without having the locks. I remember having similar problems but can't remember if having the locks or not having the locks was the issue. 


(Veryphatic) #5

Hi, I'm wondering if anyone came up with a solution to this problem? I'm having the same issue on v14.8.1: the oAuth page is coming up, returning, but nothing happens.


(Veryphatic) #6

FYI I now have a Twitter feed working that uses the REST OAuth 2 Legged asset instead of REST Resource OAuth Session as used in the tutorial.


(Stuart W) #7

Could I trouble you to tell me a little about how you did that?

Would I be correct to assume that you just put the Consumer Key and Secret into the REST OAuth 2 Legged asset, and then created and completed the REST Resource JavaScript asset as per the tutorial?

Thanks

Stu


(Tbaatar) #8

FYI I now have a Twitter feed working that uses the REST OAuth 2 Legged asset instead of REST Resource OAuth Session as used in the tutorial.

 

The Oauth 1.0 method is being retired by Twitter since last year, so anytime it could go down.

 

https://blog.twitter.com/2013/api-v1-retirement-final-dates


(Stuart W) #9

Thanks for that, I will wait until we upgrade to version 5 in May to play with it.

Stu