Version number not in url
Khodl opened this issue · 2 comments
It seems that paths like /me/messages
are transformed to https://graph.facebook.com/me/messages
instead of https://graph.facebook.com/v2.6/me/messages
. It caused me a problem that was solved that way, by hardcoding version number
As far as I know, it's GuzzleHttp that make this uri conversion.
The simple version would be to set base_uri
to self::API_URL.self::API_VERSION.'/'
and change routes to me/messages
(relative path) instead of /me/messages
(from domain root)
Is there a cleaner way to do it?
Hello @Khodl !
Thanks for reporting this issue. According to your research and the Guzzle doc (cf http://docs.guzzlephp.org/en/latest/quickstart.html#creating-a-client), you are right about the version number being removed from the url.
Your solution is the proper way to solved it and i've already made a PR to fix this ;) !
Great! Just tried it, works like a charm now 💪