jdolitsky / AppDotNetPHP

PHP library for the App.net Stream API
34 stars 19 forks source link

getAuthUrl() should accept scope as a parameter #12

Closed ravisorg closed 11 years ago

ravisorg commented 11 years ago

(vs being hardcoded)

This is mostly a note for myself, but if someone else wants to do it first, cheers! :)

jdolitsky commented 11 years ago

added this to constructor

ravisorg commented 11 years ago

I was thinking getAuthUrl() made more sense, since it's only ever used once, in that function, and if it's there you can call it multiple times to get different auth urls (for example, you could have a list of links on a site, each granting different access rights). Having it in the constructor works, but would then require you to reconstruct the object every time you wanted a different auth url...

Just my 2 cents :)

jdolitsky commented 11 years ago

good call

jdolitsky commented 11 years ago

callback url should probably also be added to getAuthUrl under your premise, as you can now specify more than one callback for an app within the developers console. the construct will only need the client id and secret

ravisorg commented 11 years ago

Good point!

Scope,callbackurl perhaps?

ravisorg commented 11 years ago

Fixed. used callback, scope, as scope can be defaulted to nothing, but callback must be specified.