Add PHP samples
Added PHP sample code.
CLA Assistant Lite bot All Contributors have signed the CLA. If the commit check is not passing, a maintainer must go the Checks tab of this PR and rerun the GitHub Action.
I have read the CLA Document and I hereby sign the CLA
recheck
Thank you for these submissions! It might take me a little while to check over them (my PHP skills are a little rusty, but this is a good opportunity to refresh them!). Much appreciated.
@andypiper thanks! Let me know if you have any questions/concerns.
Hello @andypiper just wondering if you had a chance to look into this. Thanks!
I just added a few more PHP samples. Is there someone at Twitter who can review this pull request?
Thanks!
Anyone check these to make sure they actually work? None of the examples work for me, all return the exception message without any values for $errors, $status_code.
Yes, I changed the appropriate values for tokens, username, id, etc. It is an existing app in my account so no reason it shouldn't work.
@morrow95 I just tested again and it works for me.
Can you please share the code you are using and the error you are getting?
@mhawry Apologies. Turned out it was partly due to not having a cacert.pem on my local dev. However, I did notice, atleast for the ones I was interested in using, I couldn't just use the bearer token as in the code - it required the actual oauth.
@morrow95 which of the samples required OAuth authorization? I'll look into it.