J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 802 forks source link

clarity on setting getfields #258

Closed kublasean closed 5 years ago

kublasean commented 6 years ago

It would be nice if you added somewhere in the documentation - perhaps I'm missing it - or as a comment next to setGetfield() that when passing links as arguments (ex. $getfield = '?url=[I am a link]') that the urls should NOT be decoded with urldecode() beforehand, because that is done in your code.

I just spent like an hour trying to figure out why

$getfield = '?url=https%3A%2F%2Ftwitter.com%2FInterior%2Fstatus%2F507185938620219395'

wasn't working as a get field, and that's because it should have been

$getfield = '?url=https://twitter.com/Interior/status/507185938620219395'.

J7mbo commented 5 years ago

Hey! Thanks for your input - could you point to where in my code your first get field suggestion is and I can fix that doc? I can't seem to find it... Thanks! :)

kublasean commented 5 years ago

Y'know after reviewing why I made this issue and actually looking at your examples it's pretty clear that I didn't need to decode the urls. I thought I needed to at the time because I was using this in tandem with some other api where I did have to decode them. So nevermind! Works great by the way, I used this on my bands website to automatically propagate tweets from our band account to our home page