And this is the code I used to dump this: $connection = new TwitterOAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, $account['access_token_key'], $account['access_token_secret']); var_dump($connection);
On Tue, Jun 21, 2011 at 2:00 PM, Gene Ellis <gene.el...@gmail.com> wrote: > yep...that is what I did. This is what I received back: > > > > object(TwitterOAuth)#1 (5) { ["http_status:private"]=> NULL > ["last_api_call:private"]=> NULL ["sha1_method"]=> > object(OAuthSignatureMethod_HMAC_SHA1)#2 (0) { } ["consumer"]=> > object(OAuthConsumer)#3 (3) { ["key"]=> string(22) > "Oa8K2pY7L19CLwerewVzJ5eES1A" ["secret"]=> string(42) > "INoKYGcqbQqOrwerwhWuR2qUntjHx8xMDJaofc9dRkomRow" ["callback_url"]=> NULL } > ["token"]=> object(OAuthConsumer)#4 (3) { ["key"]=> string(50) > "253725180-K6WHcDeILj3O6bikV1yC8zgYZqsrwerwdovyAJaTfyZ73" ["secret"]=> > string(43) "ENnvceX4JNbLTzTuVrwerwduATxXnFm0VRZkyNkc" ["callback_url"]=> > NULL } } > > The values have been changed, but I don't see the header info. Am I missing > something? > > > On Tue, Jun 21, 2011 at 1:57 PM, Scott Wilcox <sc...@dor.ky> wrote: > >> var_dump the $connection object and find it in there. >> >> On 21 Jun 2011, at 19:55, Gene Ellis wrote: >> >> Hmmm....getting closer but I don't see the http headers in there. I even >> did a var dump, but didn't see anything related to http_info. Know where >> else I could look? >> >> >> >> On Tue, Jun 21, 2011 at 1:35 PM, Abraham Williams <4bra...@gmail.com>wrote: >> >>> I can't test to confirm at the moment but I think I set up TwitterOAuth >>> to include headers in the TwitterOAuth object. >>> >>> If you create a TwitterOAuth object like this: >>> >>> $connection = new TwitterOAuth($x, $y, $z, $a); >>> >>> Then you should be able to get the headers from the most recent request >>> like this: >>> >>> $connection->http_info; >>> >>> Abraham >>> ------------- >>> Abraham Williams | InboxQ <http://inboxq.com/> | abrah.am >>> @abraham <https://twitter.com/intent/follow?screen_name=abraham> | >>> github.com/abraham | blog.abrah.am >>> This email is: [ ] shareable [x] ask first [ ] private. >>> >>> >>> >>> On Tue, Jun 21, 2011 at 11:05, Gene Ellis <gene.el...@gmail.com> wrote: >>> >>>> I believe I am using the PHP Twitter libraries because I see Oauth.php >>>> and TwitterOauth.php being included in the script. I recently took this >>>> project over from the other developer and I am new to twitter programming, >>>> which is why I am unsure on how to grab that access level for the users in >>>> my database. >>>> >>>> >>>> >>>> On Tue, Jun 21, 2011 at 1:03 PM, Scott Wilcox <sc...@dor.ky> wrote: >>>> >>>>> Are you using any libraries? >>>>> >>>>> On 21 Jun 2011, at 18:59, Gene wrote: >>>>> >>>>> Hi Matt, >>>>> >>>>> Can you please give a quick example on how to get the X-Access-Level >>>>> value. My application runs on PHP and I would like to get the X-Access- >>>>> Level for all of the users in my application and store it into a >>>>> database. I have all the keys, and tokens and everything. I am just >>>>> getting tripped up on getting that value. Thanks for your help. >>>>> >>>>> Regards, >>>>> >>>>> Gene >>>>> >>>>> On Jun 13, 7:56 pm, Matt Harris <thematthar...@twitter.com> wrote: >>>>> >>>>> Hey everyone, >>>>> >>>>> >>>>> A number of updates were made to the Direct Message methods and OAuth >>>>> >>>>> screens at the end of last week. Here's what went out: >>>>> >>>>> >>>>> * force_login is now supported >>>>> onhttps://api.twitter.com/oauth/authorize >>>>> >>>>> * the OAuth screens now support a feature phone tier of handsets and >>>>> render >>>>> >>>>> them in a simpler format >>>>> >>>>> * the language on all the screens is standardized to say "direct >>>>> message" >>>>> >>>>> * there is a "Return to App" URL on the Deny and Cancel screens that >>>>> >>>>> redirects the user to the oauth_callback url with a 'denied' parameter >>>>> >>>>> instead of oauth_token. >>>>> >>>>> >>>>> This next parameter isn't needed by everybody but we will be adding >>>>> >>>>> screen_name support to the authorize and authenticate pages in the next >>>>> few >>>>> >>>>> days. If you want to add this to your code ready for when we release >>>>> the >>>>> >>>>> feature you can, but please know the screen_name parameter will be >>>>> ignored >>>>> >>>>> unless you also provide the force_login parameter. The screen_name >>>>> parameter >>>>> >>>>> pre-fills the username field of the OAuth screen when force_login is >>>>> true. >>>>> >>>>> The user is still able to edit the field, even if it is prefilled. >>>>> >>>>> >>>>> Lastly, these are the main points discussed in previous emails and >>>>> Tweets: >>>>> >>>>> * The new permission level will be enforced on 30th June. >>>>> >>>>> * If you don't need to read or delete direct messages you do not need >>>>> to >>>>> >>>>> update the permission level of your application. >>>>> >>>>> * Read/Write applications will still be able to send direct messages, >>>>> even >>>>> >>>>> after the enforcement date. >>>>> >>>>> * Existing oauth_tokens will not be invalidated, even if the >>>>> application >>>>> >>>>> permission level is altered. >>>>> >>>>> * You can find out the current permission level of an oauth_token by >>>>> >>>>> inspecting the headers of an authenticated request to the API. Look for >>>>> >>>>> the X-Access-Level header. >>>>> >>>>> >>>>> -- >>>>> Scott Wilcox >>>>> >>>>> @dordotky | sc...@dor.ky | http://dor.ky >>>>> +44 (0) 7538 842418 | +1 (646) 827-0580 >>>>> >>>>> >>>>> -- >>>>> Twitter developer documentation and resources: >>>>> https://dev.twitter.com/doc >>>>> API updates via Twitter: https://twitter.com/twitterapi >>>>> Issues/Enhancements Tracker: >>>>> https://code.google.com/p/twitter-api/issues/list >>>>> Change your membership to this group: >>>>> https://groups.google.com/forum/#!forum/twitter-development-talk >>>>> >>>> >>>> >>>> -- >>>> Twitter developer documentation and resources: >>>> https://dev.twitter.com/doc >>>> API updates via Twitter: https://twitter.com/twitterapi >>>> Issues/Enhancements Tracker: >>>> https://code.google.com/p/twitter-api/issues/list >>>> Change your membership to this group: >>>> https://groups.google.com/forum/#!forum/twitter-development-talk >>>> >>> >>> >>> -- >>> Twitter developer documentation and resources: >>> https://dev.twitter.com/doc >>> API updates via Twitter: https://twitter.com/twitterapi >>> Issues/Enhancements Tracker: >>> https://code.google.com/p/twitter-api/issues/list >>> Change your membership to this group: >>> https://groups.google.com/forum/#!forum/twitter-development-talk >>> >> >> >> -- >> Twitter developer documentation and resources: >> https://dev.twitter.com/doc >> API updates via Twitter: https://twitter.com/twitterapi >> Issues/Enhancements Tracker: >> https://code.google.com/p/twitter-api/issues/list >> Change your membership to this group: >> https://groups.google.com/forum/#!forum/twitter-development-talk >> >> >> -- >> Scott Wilcox >> >> @dordotky | sc...@dor.ky | http://dor.ky >> +44 (0) 7538 842418 | +1 (646) 827-0580 >> >> -- >> Twitter developer documentation and resources: >> https://dev.twitter.com/doc >> API updates via Twitter: https://twitter.com/twitterapi >> Issues/Enhancements Tracker: >> https://code.google.com/p/twitter-api/issues/list >> Change your membership to this group: >> https://groups.google.com/forum/#!forum/twitter-development-talk >> > > -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk