Uncaught exception: To set up @anywhere, please provide a client ID


#1

I am using a tweebox on my site which I had working yesterday. The site is a facebook app and due to problems with Safari I removed some code that grabbed the facebook user and instead just passed the info I needed right to he page. I don’t believe this change was the problem as I reverted back to my setup from yesterday on a browser that did work previously and I get this new error still.

Can anyone give me some solutions or possible things to check to see why this is happening. I was so close to finishing this task, just needed Safari to work and now this error has killed it for all browsers ugh.

I also reset my keys just to see if that would do anything and it did not.

Thanks,


#2

Without knowing what code you’re specifically running, the best advice I can give you is to:

Find part of your code that looks something like this:

And make sure that “YOUR_API_KEY” matches the current value you have as your API key/consumer key on your application record on dev.twitter.com.


#3

Thanks for the replay Taylor,

My key is correct, what is strange to me is that this worked yesterday and today I haven’t changed any code related to the @anywhere api.

My

The key is correct and the tag is placed in the head of my page.

then we have.

twttr.anywhere(function (T) {
	var currentUser,
    screenName,
    profileImage,
    profileImageTag;

	if(T.isConnected()){
		currentUser = T.currentUser;
  screenName = currentUser.data('screen_name');
  profileImage = currentUser.data('profile_image_url');
  profileImageTag = "<img src='" + profileImage + "' width='40' height='40'/>";

		$("#tbox").append(profileImageTag + ' <span id="tUserText">Logged in as ' + screenName + ': <a href="" id="tSignOut">Sign out of Twitter?</a></span>');
		T("#tbox").tweetBox({
			counter: true,
			height: 90,
			width: 370,
			label: "Tweet this GRUDG&trade;?",
			defaultContent: "<? echo $displayText; ?>",
			onTweet: function(){
				$.ajax({
					url: '<?php echo CALLBACK_URL; ?>services/ajax.php?action=count_tweet',
					data: { uid: uid, session: '<? echo json_encode($fbSession); ?>' },
					success: function(data){
						if(data == 'OK'){
							$('#twitterBox').hide();
							parent.$('#alertOverlay').fadeOut('slow').remove();
							$.ajax({
								url: '<? echo CALLBACK_URL; ?>services/ajax.php?action=refresh_get_immunity',
								data: { uid: '<? echo $uid; ?>' },
								success: function(data){
									parent.doImmunity(data);
								}
							});
						}else{
							$(this).html(data);
						}
					}
				});
			}
		});
		$("#tSignOut").bind("click", function () {
      twttr.anywhere.signOut();
				$('#twitterBox').hide();
				parent.$('#alertOverlay').fadeOut('slow').remove();
				$.ajax({
					url: '<? echo CALLBACK_URL; ?>services/ajax.php?action=refresh_get_immunity',
					data: { uid: '<? echo $uid; ?>' },
					success: function(data){
						parent.doImmunity(data);
					}
				});		
  });
	}else{
		T("#tconnect").connectButton({
			authComplete: function(user) {
				$("#tconnect").hide();
				T("#tbox").tweetBox({
					counter: true,
					height: 90,
					width: 370,
					defaultContent: "<? echo $displayText; ?>",
					onTweet: function(){
						$.ajax({
							url: '<?php echo CALLBACK_URL; ?>services/ajax.php?action=count_tweet',
							data: { uid: uid, session: '<? echo json_encode($fbSession); ?>' },
							success: function(data){
								if(data == 'OK'){
									$('#twitterBox').hide();
									parent.$('#alertOverlay').fadeOut('slow').remove();
									$.ajax({
										url: '<? echo CALLBACK_URL; ?>services/ajax.php?action=refresh_get_immunity',
										data: { uid: '<? echo $uid; ?>' },
										success: function(data){
											parent.doImmunity(data);
										}
									});		
								}else{
									$(this).html(data);
								}
							}
						});
					}
				});
			},
			signOut: function() {
				$('#tweetClose').click(function(){
					parent.$('#alertOverlay').fadeOut('slow').remove();
					$.ajax({
						url: '<? echo CALLBACK_URL; ?>services/ajax.php?action=refresh_get_immunity',
						data: { uid: '<? echo $uid; ?>' },
						success: function(data){
							parent.doImmunity(data);
						}
					});		
				});
			}
		});
	}

});


#4

Found it, when sending passing my facebook session variable I was not escaping some special characters. I stopped passing the session and all the twitter stuff works.

Sorry for wasting your time.


#5