Tweet.js-Mod icon indicating copy to clipboard operation
Tweet.js-Mod copied to clipboard

Uncaught TypeError: Object #<Object> has no method 'twit'

Open eighteight opened this issue 11 years ago • 12 comments

I seem to have followed the directions, but get the "Uncaught TypeError: Object #<Object> has no method 'twit' ". Please look at the http://post.scriptum.ru to see this error. Thank you very much.

eighteight avatar Mar 25 '14 01:03 eighteight

Your ".repertory" class in your JS does not seem to match up to the div id in the html page which has

They should match up. Try that first.

wtadesign avatar Mar 25 '14 02:03 wtadesign

Hi! There is<div class="repertory"></div> element and it is being referred to as $(".repertory"). Sorry what is not matching?

Thanks.

eighteight avatar Mar 25 '14 02:03 eighteight

hi

This JS script code in your head section the class .repertory, there is no div associated with it. Try changing it to #scriptumBlock which you have used for the twitter feed.

try this

$(document).ready(function() { $("#scriptumBlock").twit({ userName: "postscriptums", modpath: "/js/jquery/jquerytw/", numTweets: 5, loaderText: "Загрузка репертуара...", slideIn: true, showHeading: false, headingText: "", showProfileLink: false, slideIn: true, showHeading: false, headingText: "", showProfileLink: false }); });

wtadesign avatar Mar 25 '14 02:03 wtadesign

Same error. Have a look.

eighteight avatar Mar 25 '14 02:03 eighteight

ok

try this it a ticker version, this work for me, so as a test drop this in your code.

wtadesign avatar Mar 25 '14 02:03 wtadesign

Hi, I think the part of your message got eaten. Would you like to try https://gist.github.com/

?

Thanks.

eighteight avatar Mar 25 '14 02:03 eighteight

no probs

https://gist.github.com/wtadesign/1c3f0fdec1f20cae6269

wtadesign avatar Mar 25 '14 03:03 wtadesign

only other thing is the the structure of the folder setup for the twitter folder

//

  1. Acquire /twitter/. How you wish to structure the files is up to you, but by default it is designed to be placed in the docroot of your website as a whole. (IE, domain.com/twitter). //

currently your code is

it might be helpful to have as this - as default set up in the index php twitter folder is as

wtadesign avatar Mar 25 '14 03:03 wtadesign

Right, moved past that error. Now I am getting "Uncaught TypeError: Cannot read property 'statuses' of null", which, perhaps is related to authentication.

Thanks a lot!

eighteight avatar Mar 25 '14 03:03 eighteight

No problem, just check that your index.php (in the twitter folder) app consumer and access keys/ tokens are have been setup and matchup.

wtadesign avatar Mar 25 '14 05:03 wtadesign

For the record: the last error was due to old jquery. Upgrading to current version fixed it.

Thanks for your help.

eighteight avatar Mar 26 '14 00:03 eighteight

Glad you fixed it, always a pain to setup the first time. cheers

wtadesign avatar Mar 26 '14 01:03 wtadesign