Working locally in a vagrant environment, I've been using ngrok to forward my local development environment and then adding the URL generated by ngrok in the facebook app settings. To make it work, I have to alter the base_url of the canonical url being sent to Facebook to match what facebook expects.
In addition to this, our end user editors work from an alternate domain, different from the production environment, and run into the same issue.
I've added a variable for canonical url so that admins/developers can alter the base url portion of it without hacking the module.
Comments
Comment #2
ryan.ryan commentedComment #3
ryan.ryan commentedThis could probably use validation on the url of the textfield, but will set to needs review.
Comment #4
ryan.ryan commentedRe-rolling the patch against latest dev version.
Comment #5
scottrigbyHey @ryanissamson!
A coupla things:
7.x-2.xrather than7.x-1.x(we're now adding all new features to the7.x-2.xbranch… a release tag from that branch should be coming soon).Comment #6
ryan.ryan commented1. Hey @scottrigby :D Always good to see you.
2. Ah, great, I'll join up there, thanks.
3. Sure, I'll add it through Github, no problem.
4. Cool, good to know, I'll apply to 7.x-2.x and submit.
5. I'd love to see what you did through the hook in case it does work for us. There's a couple other weird things we've got going on, so may or may not work, but would be great if it does.
One additional note, I noticed one thing that needs to be fixed to prevent the absolute url being added to another url. I'll update that. Things just got busy this afternoon, so hope to do it soon.
Comment #7
scottrigbyHey :) OK, here is essentially what we had just done:
For
7.x-1.xFor
7.x-2.xComment #8
ryan.ryan commentedThanks for that @scottrigby. That is really helpful.
In the event that it's helpful, I've went ahead and created a PR at: https://github.com/BurdaMagazinOrg/module-fb_instant_articles/pull/72
There's one additional change, which I forgot to take into account, removing the absolute url from the end portion, to prevent malformed urls.
Here's the patch as it stands: https://patch-diff.githubusercontent.com/raw/BurdaMagazinOrg/module-fb_i...
Comment #9
ryan.ryan commentedComment #11
scottrigbyMerged! Nice feature
Comment #12
ryan.ryan commentedThanks Scott!
Also, for anyone else that might be coming from the 7.x-1.x branch, here's a patch for that: https://patch-diff.githubusercontent.com/raw/BurdaMagazinOrg/module-fb_i...