Hello. I had a problem with the wrong expires_on parameter of an access token. Also, I added a new method inside GraphService to have the possibility to send some data in Graph API, for example, to post some messages to selected channels.

Comments

str8 created an issue. See original summary.

str8’s picture

fabianderijk’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can you explain a bit why the expires_on parameter was wrong for you? We have tested it like it was, and it seem to work for our situations.

str8’s picture

StatusFileSize
new52.29 KB

It was wrong because operation with adding time() was done inside oauth2-client. You could check it here vendor/league/oauth2-client/src/Token/AccessToken.php 78 line. And this property 'expires' returns with getExpires() method.

fabianderijk’s picture

Status: Postponed (maintainer needs more info) » Needs work

Good one. I never noticed this. Can you update the patch to fix the expires_on parameter, and add a new issue with the added method? I think the expires_on parameter need to be fixed ASAP (it's a bug) and the new method is a new feature that we should test thouroughly.

Thanks in advance!

str8’s picture

StatusFileSize
new552 bytes

Yes. No problem. Here is a new patch. An issue with the new method I'll create a little bit later.

str8’s picture

Title: expires_on fix and sendGraphData method » expires_on fix
fabianderijk’s picture

This is now fixed in the dev version

fabianderijk’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.