User-Agent doesn't get set on any request I make.
This happens in Chrome and Mozilla running on Linux.
The user agent should be set for all of the curl calls. See http://github.com/jmathai/foursquare-async/blob/master/EpiOAuth.php#L126
Closing for now. If you can provide a specific case where it's not being set then let me know.
It is very probable I'm making a mistake, I'm just starting with web development and some concepts are very new to me yet :)
I was setting the user-agent variable to something else but when looking at firebug it says I was using the default FireFox string...
I'll look at this again tomorrow :)
No problem. The useragent string that foursquare-async uses is never visible to the end user. It's sent to the twitter api only. The end user will not see anything different from other calls to your server.
The flow looks like this. So as far as the end user is concerned, they're always only talking to your server as normal.
Your computer -> your server -> twitter -> your server -> your computer
Wow, that makes sense :)
Now I'm feeling stupid hehe, this was a simple one...
I'm now printing the headers to confirm everything is good and it seems to be, is there any other way of confirming/testing this?
Not sure what you mean about confirming and testing. If the call fails then the library will throw an exception as you access the results. If no exception is thrown then you can assume everything went ok since it means that Foursquare returned a HTTP 200 status code.
Because of this you'll want your code to be in a try/catch block. See the documentation for details: http://github.com/jmathai/foursquare-async/wiki#exceptions
Sorry, didn't explain properly.
I mean, in general, how would you check which information is being sent on a server-server request, for debugging purposes?
Just general curiosity :)
Thanks again :) and by the way, congratulations :)
Well, your server decides what information is being sent as part of the call to the Foursquare api. You can access any attributes of the response to see what Foursquare sent back to you. As far as debugging, you can print_r, var_dump, error_log or anything you choose.
Great, thanks :)
That's what I'm doing then, I was just confirming if there was some other technique I was missing :)