Open elkebe opened 4 months ago
Hello,
These two are not errors. error
item in the printed array (response) is empty and the status code is 200 which means the request was successful
Running Task Social Media - refresh token Array ( [error] => [status_code] => 200 [data] => 1 )
Running Task Social Media - sync Array ( [error] => [status_code] => 200 [data] => 1 )
The third one highlights the error of missing credentials.
Running Task Social Media - long-lived token Array ( [error] => 1 [status_code] => 403 [message] => Missing credentials )
So, when you run Get long-lived token task dev/tasks/SocialMediaToken
you need to make sure you specify App Secret and Access Token in the module's settings in the cms (Social Media > Settings > API).
When you run Refresh long-lived tokens task /dev/tasks/SocialMediaRefresh
the Long-Lived Access Token should be presented as well due to the fact that in order to refresh long-live token you need to provide the current one.
If you run Get long-lived token task first, it will store the long-lived token in the database automatically, and you should be able to run refresh task after without doing anything, but not in the opposite order.
Hope it helps.
Thanks that's very helpful! I guess the only thing I can suggest, is that the response shows something a little more meaningful to the CMS user, such as "Instagram posts were successfully downloaded" or something to the extent.
Great module by the way :)
I keep getting the following errors when running tasks:
Running Task Social Media - refresh token Array ( [error] => [status_code] => 200 [data] => 1 )
Running Task Social Media - long-lived token Array ( [error] => 1 [status_code] => 403 [message] => Missing credentials )
Running Task Social Media - sync Array ( [error] => [status_code] => 200 [data] => 1 )
I have Instagram App ID, App Secret and Long-Lived Access Token - these were previously set up and worked fine with https://github.com/TheBnl/silverstripe-instagram on SS4.13, recently upgraded to SS5.2 and switched to this module as silverstripe-instagram not supported on SS5.
I have fields and limit set
I have set encryption key in .env
I'm seeing posts in the Social media admin > Posts tab, and can access the feed in $SocialFeed
Not sure what is causing these errors, as the feed does appear to sync.
Am running dev environment using DDEV.