{"id":9253,"date":"2014-02-15T21:25:07","date_gmt":"2014-02-16T05:25:07","guid":{"rendered":"http:\/\/www.perivision.net\/wordpress\/?p=9253"},"modified":"2014-02-20T19:12:14","modified_gmt":"2014-02-21T03:12:14","slug":"your-twitter-app-suddenly-does-not-work-with-oauth-could-be-your-database","status":"publish","type":"post","link":"https:\/\/www.perivision.net\/wordpress\/2014\/02\/your-twitter-app-suddenly-does-not-work-with-oauth-could-be-your-database\/","title":{"rendered":"Your Twitter app suddenly does not work with OAuth, could be your database"},"content":{"rendered":"<p><a href=\"https:\/\/www.perivision.net\/wordpress\/wp-content\/uploads\/2014\/02\/twitter64.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-9255\" alt=\"twitter64\" src=\"https:\/\/www.perivision.net\/wordpress\/wp-content\/uploads\/2014\/02\/twitter64.jpg\" width=\"141\" height=\"115\" \/><\/a>A few days back one of my twitter aps, NewsSnacker.com stopped working for some reason. I have not touched the code in months.\u00a0 So what the heck was going on?\u00a0 More odd is that fact the twittFilter was working fine.\u00a0 They are based off the same OAuth2.0 code.\u00a0 After a few hours of hacking and dropping trace statements all over the place, I figured it.<\/p>\n<p>I had a quick look at the Twitter blog to see of there was any warnings of something new with the API.\u00a0 Nothing jumped out at me but I did notice that something was changing from 32 bits to 64 bits.\u00a0 I did not pay it much mind.\u00a0 As I was debugging I finally decided to get the keys from the twitter site and manually start making some calls. The site started working again.\u00a0 What the heck?\u00a0 I checked my SQL statements and I was getting data from the database.\u00a0 Then I looked at the last 4 digits just to see of perhaps my tokens got corrupted or something.\u00a0 They do not match!\u00a0 For the first 4 digits DO match!\u00a0 Then it stuck me.\u00a0 I quickly logged into the database and yup, just as I thought.\u00a0 I had my fields set to textvar fields set to 40 charters.\u00a0 Default.\u00a0 Arrggg.. All this work and it was just the keys getting larger.<\/p>\n<p>I changed to token fields to 64 each and everything started working again.\u00a0 Well mostly again because I introduced new errors and founds some weakness in the codes that I never noticed before.\u00a0 That was one afternoon shot to hell.<\/p>\n<p>So if you suddenly find your twitter app is not working anymore, check you database schema, could be a quick fix and save you a few hours.<\/p>\n<div class=\"SPOSTARBUST-Related-Posts\"><H3>Related Posts<\/H3><ul class=\"entry-meta\"><li class=\"SPOSTARBUST-Related-Post\"><a title=\"How to fix minor rim scrape on a Tesla 3 and the 3-6-9 rule\" href=\"https:\/\/www.perivision.net\/wordpress\/2018\/05\/how-to-fix-minor-rim-scrape-on-a-tesla-3-and-the-3-6-9-rule\/\" rel=\"bookmark\">How to fix minor rim scrape on a Tesla 3 and the 3-6-9 rule<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"Now thieves are use Amps to steal your car. Now you need a Faraday cage for your key fob\" href=\"https:\/\/www.perivision.net\/wordpress\/2015\/04\/now-thieves-are-use-amps-to-steal-your-car-now-you-need-a-faraday-cage-for-your-key-fob\/\" rel=\"bookmark\">Now thieves are use Amps to steal your car. Now you need a Faraday cage for your key fob<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"How to put your iphone in developer mode to install Pebble apps\" href=\"https:\/\/www.perivision.net\/wordpress\/2014\/10\/how-to-put-your-iphone-in-developer-mode-to-install-pebble-apps\/\" rel=\"bookmark\">How to put your iphone in developer mode to install Pebble apps<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"NewsSnacker &#8211; Twitter newsfeed on the Pebble watch\" href=\"https:\/\/www.perivision.net\/wordpress\/2014\/09\/newssnacker-twitter-newsfeed-on-the-pebble-watch\/\" rel=\"bookmark\">NewsSnacker &#8211; Twitter newsfeed on the Pebble watch<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"How to fix a slow USB 3 port on the Yoga 13 ideapad or Thinkpad T430\" href=\"https:\/\/www.perivision.net\/wordpress\/2014\/09\/how-to-fix-a-slow-usb-3-port-on-the-yoga-13-ideapad-or-thinkpad-t430\/\" rel=\"bookmark\">How to fix a slow USB 3 port on the Yoga 13 ideapad or Thinkpad T430<\/a><\/li>\n<\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>A few days back one of my twitter aps, NewsSnacker.com stopped working for some reason. I have not touched the code in months.\u00a0 So what the heck was going on?\u00a0 More odd is that fact the twittFilter was working fine.\u00a0 They are based off the same OAuth2.0 code.\u00a0 After a few hours of hacking and&hellip; <a class=\"read-more\" href=\"https:\/\/www.perivision.net\/wordpress\/2014\/02\/your-twitter-app-suddenly-does-not-work-with-oauth-could-be-your-database\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1922,59,6],"tags":[457,152,177,688,2342],"class_list":["post-9253","post","type-post","status-publish","format-standard","hentry","category-how-to-2","category-tips","category-twitter","tag-api","tag-fix","tag-how-to","tag-oauth","tag-twitter"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pjzQD-2pf","_links":{"self":[{"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/posts\/9253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/comments?post=9253"}],"version-history":[{"count":2,"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/posts\/9253\/revisions"}],"predecessor-version":[{"id":9256,"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/posts\/9253\/revisions\/9256"}],"wp:attachment":[{"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/media?parent=9253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/categories?post=9253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.perivision.net\/wordpress\/wp-json\/wp\/v2\/tags?post=9253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}