Keyword replacement against oauth2 asset global_access_token


(N Wallis) #1

Hi, 

 

I am setting up a social media hub for the university and would like users to be able to add and remove facebook account oauth tokens to the system that will be used to dynamically generate our facebook feed.  I have the whole process working where I am using an asset builder to generate the oauth tokens, then some triggers to update the original token.   The triggers are firing but I have hit 1 final stumbling block where the global keyword replacement is not working when assigning the value to global_access_token.  

 

You can see in the second screenshot that the expires at value is being applied correctly, but the keyword replacement on the token is not working..   Am I doing this wrong? Any ideas?

 

Not to mention the docs have no mention of how to assign a value to global_access_token and I could only determine the parameters after perusing the source code - but thats another story and now I am just grumbling :)

 

**EDIT **

I should have also mentioned that "token" is available as a GET param.   You can see that it is available to the trigger at the time of execution as I have also assigned it to the client id of the token using global keyword replacement.   Which makes me think that its potentially just a bug with the oauth2 token asset?

 

BTW, you maybe wondering why I am not just letting the oAuth2 token asset handle the conversion of the code into a token.  The reason is that I need a long lived token which requires an additional query which isn't handled by the Matrix oAuth assets.. 

 

Thanks,

Nathan

 

 

token_1.jpg

 

token_2.jpg


(Bart Banda) #2

Not sure what happened to the images but they don't want to load for me? Might be just me?

 

Anyway, I'm curious more about what you are trying to achieve as there might be an easier way to do it? 

 

Do you want editors in Edit+ or something to be able to add feeds to any facebook account they want? 

 

It might make more sense once I see the images.

 

What version of Matrix are you in? 

 

Also, is the only stopper that your keyword isn't replacing in the trigger action? As in, it works all good if you hard code that value? 


(N Wallis) #3

Hi Bart, 

 

I took the images down as I finally got this working.

 

What we want to do is this:

 

Is to provide a webpage where our social media curator to be able to authorise/deauthorise social media accounts (facebook,twitter,instagram) and create data sources for each of the tokens created.  So far I am just getting Facebook and getting a long lived access token.  I am almost there. I am then collating all the data sources into a single data source which is sorted by date and that follows a standard data structure that works for our organisation.  I hope that makes sense. 

 

I realise there are lots of paid platforms out there than can curate social media feeds for us, but we have no additional funding for these, so we are trying to get it working in Matrix. 

 

Cheers.. 

 

**EDIT** - wouldn't it be nice if we didn't have to host our own images :)


(Bart Banda) #4

Good that you got it working, would be cool to see a tutorial written for it if it's something that can be re-used, sounds interesting.

 

By the way, the forums allow you to upload images to posts so you can just host them here. 


(N Wallis) #5

Hmm, I don't see the upload image button.  When you click the image icon, it just asks for a URL to an image.. 


(Bart Banda) #6

Click on the More Reply Options button and that will take you to an interface where you can attach files.

 

Annoying I know, another reason why we are moving to Discourse :)


(N Wallis) #7

feeling useless on this end - cant see it.  Only "My Media"?  None of the other buttons launch an upload window...  Do I need specific permissions?


(N Wallis) #8

Feeling like I am missing something, but none of the buttons I see launch an upload window.... do I need specific permissions?


(Bart Banda) #9

Hmm, don't think so, it's the button next to the Post button, you don't have it?

 

See attached... Capture.JPG (21.9 KB)


(N Wallis) #10

I have that button, but it just launches the same editor on another page with a summary of the topic below it... 


(Bart Banda) #11

So you don't have this?

 

See attached... Capture.JPG (50.3 KB)


(N Wallis) #12

nope... I am running the latest chrome on windows... 


(Bart Banda) #13

No idea then, maybe you need to get to a certain amount of posts before you can attach files... Anyways, shouldn't be an issue once we move to Discourse.