Twitter secret incorrent

  • Hi,


    Bit of an odd one, as the site was working fine.


    I have a cron job which I can see is running, but the tweets are not being pulled down. I looked at then using the url callback to test as well and it states "Incorrect secret", so something is going wrong.


    I am running runway, so, in my config.php I added:


    Code
    1. define('PERCH_SCHEDULE_SECRET', 'thisismysecret');


    and the CRON job is running:


    Code
    1. php /home/mysite/public_html/admin/core/scheduled/run.php thisismysecret


    The twitter app in the admin has the correct Consumer Key and Consumer Secret from the Twitter App I created, so I am at a bit of a loss as to why it is now failing.


    I have Forced Reauthentication a few times and this goes through fine and I have tried changing the CRON job to:


    Code
    1. php /home/mysite/public_html/admin/core/scheduled/run.php secret=thisismysecret


    but to no avail. If I press the 'Get Tweets' button from the admin, it downloads the latest tweets, so something is obviously off with the CRON job and the reading thereof.

    I am also presuming that the secret I use for the CRON job should be different to the supplied Twitter Consumer secret. Too be fair, I tried changing it to that and it still fails.


    Not sure what else to try, it's baffling.


    Any suggestions ? I think I read somewhere about potentially deleting the perch2_scheduled_tasks table, but I would rather hold fire on that until I know that this is an ok thing to do.


    Thanks,


    Andy

  • drewm

    Approved the thread.
  • The scheduled task secret has nothing to do with the Twitter authentication secret - those are completely different things.


    If you reauthenticate the Twitter app and then manually fetch tweets with the button, does that work?

  • Any further ideas ?


    If the reauthentication works and I can manually fetch the tweets, what is this leading towards. An issue with the CRON job itself, the config file not setting the secret ? The url callback is failing as well, so it's wrapped up in this somewhere.


    Could it be something to do with the server set-up. Not sure what as I'm not a server guy, but I suppose I could ask the hosting company if they have any ideas.

  • Every 15mins, but I've tried it also at every 5min, every 1min and a few others.

    However, surely the url callback would work, as does this not just force what the cron job would do at the point of submission of the url.


    I've got the hosting company to take a look as well to see if they can see any reason why this maybe happening.


    Thanks.

  • Hi Drew, just noticed your reply.


    Ok, I found a duplicate of the secret call within the different config files on the live site. I've removed it, so there is only one call and this has removed the error when I do a url call back, however, the url callback does not bring down the latest tweets to Runway (which I presume it should). The CRON job is not updating the tweets on the site either. However, the 'Get Tweets' button in the admin works.


    Moving over to my dev site. I can get tweets manually from the admin 'Get Tweets' button, the CRON job is not updating anything, the url callback fails (to be expected) but if I try to reauthenticate the app on the dev site (I'm running it on XAMPP), I get the error:


    Quote

    There was an error: Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings

    It reauthenticates fine on the live site.


    Really odd.....