Blog2020 ≫ Ah ifttt image post to twitter from strava doesn' work because...

The image url now has ampersands in and they're not being escaped! Here is an example, this is what I got when I sent today's run to myself:

{
  "created": "January 9, 2020 at 12:34PM",
  "type": "Run",
  "name": "Lunch Run",
  "distance": "5452.8",
  "time": "1629",
  "link": "http://www.strava.com/activities/2995687177",
  "img": "https://maps.googleapis.com/maps/api/staticmap?size=400x400",
  "path": "weight:3|color:0xFC4C02FF|enc:y}uvHaj{E[}FK_DUiEImC?g@MyCGiCEg@S_FEUKiNI_AIiCe@cF@iAGwBKkAE}@IgEIqBO{AAkCOyA@{@M_BMaEA{A@{AEgEIoAFuCEeBCiC@cEC{@B}BAuB@eDHkE?q@Ei@Ki@@wACWMMGNSzBCnCGjAAp@SbBKpA@l@M|@DhDCd@GZAPDRDfAHh@F|BTdC?l@I~@H~@IdADfACj@_@TGTBx@Nr@Fj@Pz@Cb@Hb@ERBn@NlATfAD\\Bv@A\\DRD|AHn@@r@HX@RATBl@Cf@Tx@B`AAPDXDrAPdDLr@\\n@FTRpA^bDb@xIH|DXxIJzAB`APrC?zARpEFrB@pCPhCRtE"
}

path is unexpected here, I think the img bit must have had &path=... in it and as it's not escaped when posted in the querystring it looks like a separate param. SO the img should be https://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:0xFC4C02FF|enc:y}uvHaj{E[}FK_DUiEImC?g@MyCGiCEg@S_FEUKiNI_AIiCe@cF@iAGwBKkAE}@IgEIqBO{AAkCOyA@{@M_BMaEA{A@{AEgEIoAFuCEeBCiC@cEC{@B}BAuB@eDHkE?q@Ei@Ki@@wACWMMGNSzBCnCGjAAp@SbBKpA@l@M|@DhDCd@GZAPDRDfAHh@F|BTdC?l@I~@H~@IdADfACj@_@TGTBx@Nr@Fj@Pz@Cb@Hb@ERBn@NlATfAD\\Bv@A\\DRD|AHn@@r@HX@RATBl@Cf@Tx@B`AAPDXDrAPdDLr@\\n@FTRpA^bDb@xIH|DXxIJzAB`APrC?zARpEFrB@pCPhCRtE

Does that work? Hmm no, because you need an api key too.

⬅️ :: ➡️

Paul Clarke's weblog - I live in A small town, Kent. Wed to Clare + father to two, I am a full-stack web developr, and I do javascript / nodejs, some ruby, other languages ect ect. I like pubs, running, eating, home-automation and other diy jiggery-pokery, history, genealogy, TV, squirrels, pirates, lego, and time travel.