Cannot use ShowTweetBox due to callback URL not authorized


#1

Hello,
I am using ShowTweetBox of @Anywhere feature and using jTweetAnywhere jQuery plugin in my Web application page. I have registered my Web application and obtained the consumer key as API key from twitter.com. I have included the anywhere.js with my API key in the page header.

The custom tweet box was shown successfully and I was able to enter text and click “Tweet” button to submit. However I then received the following error:

The provided callback url https://questsoftware157-e5d28b579e5a8b.sharepoint.com/sites/dev/SharePointSocialApp/Pages/Home.aspx?SPHostUrl=https://questsoftware157.sharepoint.com/sites/dev&SPLanguage=en-US&SPAppWebUrl=https://QuestSoftware157-e5d28b579e5a8b.sharepoint.com/sites/dev/SharePointSocialApp is not authorized for the client registered to ‘https://questsoftware157-e5d28b579e5a8a.sharepoint.com/sites/dev/SharePointSocialApp/

No matter how I tweak the callback URL in my twitter application account settings, I always receive the above error. What did I do wrong?

Thanks in advance.
Sean


#2

@Anywhere apps lock to domains, including subdomains. It looks like there is a slight difference between those two domains you’re accessing features from and you’ll need to add the variants to your allowed @anywhere domains on your application record.


#3

I just solved the problem this moring. You are right, there is a slight difference between my registered callback url and actual url. It was even visible from my first post but I did not catch it. I am using Office 365 Preview tenancy for my app and the tenancy ID changes slightly everytime my app is deployed. So previously working app will not work any more due to the URL change. In the above example I gave, the domain is “https://questsoftware157-e5d28b579e5a8a.sharepoint.com” but my actual app is “https://questsoftware157-e5d28b579e5a8b.sharepoint.com”. There is one diference, the last character of the tenancy ID, i.e. e5d28b579e5a8a.