Twitter Authorization Error on javascript.... if (link.classList.contains('register')) return;

Mar 8, 2013 at 12:54 AM
All the sudden I get this error after I
process the code statement below in my web application:

c# function() // I call this line of code
{
// call Twitter from my web app in .NET using c#
WebAuthorizer.BeginAuthorization(callback);
}


This is CODE below on the Twitter Authorization Application Page and this is where it CRASHES
  using(
'imports/jquery',
function($) {
$('a').each(function (i, link) {

if (link.classList.contains('register')) return; //THE CODE BREAKS HERE....this always worked before it just started breaking today!! March 6 2013
link.target = "_blank";
});
});

This is the error that i get back
Microsoft JScript runtime error: Unable to get value of the property 'contains': object is null or undefined

please if anyone can help me, I would appreciate any help

am I missing a new .dll for LinqToTwitter?

or is it on the Twitter side that i am missing?
Coordinator
Mar 8, 2013 at 4:39 AM
Hi,

I saw your tweet today, but there wasn't enough info. Looking at your description of the problem, an error occurs in your jQuery. Since LINQ to Twitter runs on managed code, I'm not seeing the relationship of how it could have caused the problem.

If you have an older version of LINQ to Twitter, you should upgrade to the latest. Twitter has deprecated Twitter API v1.0 and is currently doing gradual blackouts. LINQ to Twitter is available via NuGet or this site.

@JoeMayo
Mar 8, 2013 at 7:27 PM
should I turn on "Sign in with Twitter"?

We’ve brought back the Allow this application to use 'Sign in with Twitter' option. You may remember this option from a couple years ago — at the time, it did not have a material effect on the OAuth flow, so we removed it. We’ve brought it back so applications can explicitly define their intended authorization behavior.
This change allows automatic redirection only for applications that request it. Applications that use /oauth/authenticate and rely on the automatic redirection behavior for logged-in users must enable this "Sign in with Twitter" option. If the option is not enabled, users will instead be directed to /oauth/authorize and will then be prompted to complete the application approval flow.

Michael W. Boise
1-877-LED-KING
Inventor/Programmer/Web Designer
www.rhythmvizion.com
"Rhythm Vizion - Sound Activated L.E.D Sunglasses"


From: [email removed]
To: [email removed]
Date: Thu, 7 Mar 2013 21:39:34 -0800
Subject: Re: Twitter Authorization Error on javascript.... if (link.classList.contains('register')) return; [LinqToTwitter:435832]

From: JoeMayo
Hi,

I saw your tweet today, but there wasn't enough info. Looking at your description of the problem, an error occurs in your jQuery. Since LINQ to Twitter runs on managed code, I'm not seeing the relationship of how it could have caused the problem.

If you have an older version of LINQ to Twitter, you should upgrade to the latest. Twitter has deprecated Twitter API v1.0 and is currently doing gradual blackouts. LINQ to Twitter is available via NuGet or this site.

@JoeMayo
Read the full discussion online.
To add a post to this discussion, reply to this email (LinqToTwitter@discussions.codeplex.com)
To start a new discussion for this project, email LinqToTwitter@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Coordinator
Mar 9, 2013 at 1:38 AM
You can give it a try to see if it help. What kind of response are you seeing if you hook up fidder to watch the HTTP calls?

@JoeMayo
Mar 9, 2013 at 9:42 PM
I get the error in Visual Studio which goes into the Twitter Authorization Page on twitter and displays an error in there javascript when checking for a variable
that is not there..this was always working so I am lost..I been debugging for 3 days and 3 pots of coffee!!

here is a picture of the response i get attached..

if any of The Rulers of the World of Coding can offer and hints or advice I will buy you a stripper if you ever come to Vegas!! lol..or whatever starbucks..


Michael W. Boise
1-877-LED-KING
Inventor/Programmer/Web Designer
www.rhythmvizion.com
"Rhythm Vizion - Sound Activated L.E.D Sunglasses"


From: [email removed]
To: [email removed]
Date: Fri, 8 Mar 2013 18:38:54 -0800
Subject: Re: Twitter Authorization Error on javascript.... if (link.classList.contains('register')) return; [LinqToTwitter:435832]

From: JoeMayo
You can give it a try to see if it help. What kind of response are you seeing if you hook up fidder to watch the HTTP calls?

@JoeMayo
Read the full discussion online.
To add a post to this discussion, reply to this email (LinqToTwitter@discussions.codeplex.com)
To start a new discussion for this project, email LinqToTwitter@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com