3pillarlabs / socialauth-android

SocialAuth repository which contains socialauth android version and samples
MIT License
314 stars 133 forks source link

Twitter Authorization - getAuthenticaionUrl error #28

Open clevis240 opened 10 years ago

clevis240 commented 10 years ago

When connecting with Twitter I receive this error:

org.brickred.socialauth.exception.SocialAuthConfigurationException?: Application keys are not correct. The server running the application should be same that was registered to get the keys.

(1) the keys are correct (2) addCallback() sets the same URL used as the callback in Twitter Apps page.

I can get around the problem by providing my own URL within the SocialAuthAdapter by commenting out this line:

url = socialAuthManager.getAuthenticationUrl(provider.toString(), provider.getCallBackUri())+ "&type=user_agent&display=touch";

And supplying my own OAuth URL. All other providers work. May be an issue with how the URL is formed by the socialAuthManager.

vineetmobile commented 10 years ago

Hi

Have you check read/write access

clevis240 commented 10 years ago

I have setting to read write and direct message

Sent from my iPhone

On Jul 4, 2014, at 3:04 AM, vineetmobile notifications@github.com wrote:

Hi

Have you check read/write access

— Reply to this email directly or view it on GitHub.

clevis240 commented 10 years ago

I am including the error message along with my keys so you can try

here is the error message:

07-04 10:50:07.698: D/SocialAuthAdapter(10850): Selected provider is twitter 07-04 10:50:07.698: D/SocialAuthAdapter(10850): Loading keys and secrets from configuration 07-04 10:50:07.758: I/SocialAuthConfig(10850): Loading application configuration 07-04 10:50:07.758: D/SocialAuthAdapter(10850): Starting webview for authentication 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugins 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.FeedPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.AlbumsPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Determining URL for redirection 07-04 10:50:07.839: I/OAuth1(10850): Determining URL for redirection 07-04 10:50:08.079: I/dalvikvm(10850): Jit: resizing JitTable from 8192 to 16384 07-04 10:50:08.659: D/SocialAuthError(10850): org.brickred.socialauth.exception.SocialAuthConfigurationException: Application keys are not correct. The server running the application should be same that was registered to get the keys.


here is how I am connecting:

adapter.addCallBack(Provider.TWITTER, "http://www.mapamoto.com/start.php"); adapter.authorize(getActivity(), Provider.TWITTER);

here are my keys so you can try

twitter

twitter.com.consumer_key = 0kVDSS4tHYPwG3VuOi9LCQVaW twitter.com.consumer_secret = 0Gp08wJjHTz9Y9xuAiAWW5ngzLEtSAVPDRhlwWO0xiCR7p7Quw

On Fri, Jul 4, 2014 at 8:47 AM, Christian Levis christian.levis@gmail.com wrote:

I have setting to read write and direct message

Sent from my iPhone

On Jul 4, 2014, at 3:04 AM, vineetmobile notifications@github.com wrote:

Hi

Have you check read/write access

— Reply to this email directly or view it on GitHub https://github.com/3pillarlabs/socialauth-android/issues/28#issuecomment-48014339 .

clevis240 commented 10 years ago

I deleted and recreated the app to be sure. Still not working here are the new keys

API key 3iV0UZqTcUBYSVoNj65MxqvF3 API secret kvwrx5MepjWVoboB5CQ3yt3maWy8DbrNqoeCavsqKxbLIpg03c

Callback: http://mapamoto.com/start.php

On Fri, Jul 4, 2014 at 10:51 AM, Christian Levis christian.levis@gmail.com wrote:

I am including the error message along with my keys so you can try

here is the error message:

07-04 10:50:07.698: D/SocialAuthAdapter(10850): Selected provider is twitter 07-04 10:50:07.698: D/SocialAuthAdapter(10850): Loading keys and secrets from configuration 07-04 10:50:07.758: I/SocialAuthConfig(10850): Loading application configuration 07-04 10:50:07.758: D/SocialAuthAdapter(10850): Starting webview for authentication 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugins 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.FeedPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.AlbumsPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Determining URL for redirection 07-04 10:50:07.839: I/OAuth1(10850): Determining URL for redirection 07-04 10:50:08.079: I/dalvikvm(10850): Jit: resizing JitTable from 8192 to 16384 07-04 10:50:08.659: D/SocialAuthError(10850): org.brickred.socialauth.exception.SocialAuthConfigurationException: Application keys are not correct. The server running the application should be same that was registered to get the keys.


here is how I am connecting:

adapter.addCallBack(Provider.TWITTER, "http://www.mapamoto.com/start.php "); adapter.authorize(getActivity(), Provider.TWITTER);

here are my keys so you can try

twitter

twitter.com.consumer_key = 0kVDSS4tHYPwG3VuOi9LCQVaW twitter.com.consumer_secret = 0Gp08wJjHTz9Y9xuAiAWW5ngzLEtSAVPDRhlwWO0xiCR7p7Quw

On Fri, Jul 4, 2014 at 8:47 AM, Christian Levis <christian.levis@gmail.com

wrote:

I have setting to read write and direct message

Sent from my iPhone

On Jul 4, 2014, at 3:04 AM, vineetmobile notifications@github.com wrote:

Hi

Have you check read/write access

— Reply to this email directly or view it on GitHub https://github.com/3pillarlabs/socialauth-android/issues/28#issuecomment-48014339 .

clevis240 commented 10 years ago

Just sent a similar email to someone else on your team (2 people responded to me)

In a new development, after sending an APK to a different person to test, on their device the twitter dialog does load. I still cannot get this to work on my device. Are there any phone specific issues you are aware of? From my reading on the documentation the log in takes place through a web view and so it should not be phone specific.

Also has anyone tried to connect using my keys and callback?

I'd love to get this working since the rest of your library is so great and I'd rather use one external library than have to resort for twitter4j. Your assistance is greatly appreceated

c

On Fri, Jul 4, 2014 at 11:15 AM, Christian Levis christian.levis@gmail.com wrote:

I deleted and recreated the app to be sure. Still not working here are the new keys

API key 3iV0UZqTcUBYSVoNj65MxqvF3 API secret kvwrx5MepjWVoboB5CQ3yt3maWy8DbrNqoeCavsqKxbLIpg03c

Callback: http://mapamoto.com/start.php

On Fri, Jul 4, 2014 at 10:51 AM, Christian Levis < christian.levis@gmail.com> wrote:

I am including the error message along with my keys so you can try

here is the error message:

07-04 10:50:07.698: D/SocialAuthAdapter(10850): Selected provider is twitter 07-04 10:50:07.698: D/SocialAuthAdapter(10850): Loading keys and secrets from configuration 07-04 10:50:07.758: I/SocialAuthConfig(10850): Loading application configuration 07-04 10:50:07.758: D/SocialAuthAdapter(10850): Starting webview for authentication 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugins 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.FeedPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.AlbumsPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Determining URL for redirection 07-04 10:50:07.839: I/OAuth1(10850): Determining URL for redirection 07-04 10:50:08.079: I/dalvikvm(10850): Jit: resizing JitTable from 8192 to 16384 07-04 10:50:08.659: D/SocialAuthError(10850): org.brickred.socialauth.exception.SocialAuthConfigurationException: Application keys are not correct. The server running the application should be same that was registered to get the keys.


here is how I am connecting:

adapter.addCallBack(Provider.TWITTER, "http://www.mapamoto.com/start.php "); adapter.authorize(getActivity(), Provider.TWITTER);

here are my keys so you can try

twitter

twitter.com.consumer_key = 0kVDSS4tHYPwG3VuOi9LCQVaW twitter.com.consumer_secret = 0Gp08wJjHTz9Y9xuAiAWW5ngzLEtSAVPDRhlwWO0xiCR7p7Quw

On Fri, Jul 4, 2014 at 8:47 AM, Christian Levis < christian.levis@gmail.com> wrote:

I have setting to read write and direct message

Sent from my iPhone

On Jul 4, 2014, at 3:04 AM, vineetmobile notifications@github.com wrote:

Hi

Have you check read/write access

— Reply to this email directly or view it on GitHub https://github.com/3pillarlabs/socialauth-android/issues/28#issuecomment-48014339 .

clevis240 commented 10 years ago

Still unable to resolve this issue. Any updates?

On Tue, Jul 8, 2014 at 5:25 PM, Christian Levis christian.levis@gmail.com wrote:

Just sent a similar email to someone else on your team (2 people responded to me)

In a new development, after sending an APK to a different person to test, on their device the twitter dialog does load. I still cannot get this to work on my device. Are there any phone specific issues you are aware of? From my reading on the documentation the log in takes place through a web view and so it should not be phone specific.

Also has anyone tried to connect using my keys and callback?

I'd love to get this working since the rest of your library is so great and I'd rather use one external library than have to resort for twitter4j. Your assistance is greatly appreceated

c

On Fri, Jul 4, 2014 at 11:15 AM, Christian Levis < christian.levis@gmail.com> wrote:

I deleted and recreated the app to be sure. Still not working here are the new keys

API key 3iV0UZqTcUBYSVoNj65MxqvF3 API secret kvwrx5MepjWVoboB5CQ3yt3maWy8DbrNqoeCavsqKxbLIpg03c

Callback: http://mapamoto.com/start.php

On Fri, Jul 4, 2014 at 10:51 AM, Christian Levis < christian.levis@gmail.com> wrote:

I am including the error message along with my keys so you can try

here is the error message:

07-04 10:50:07.698: D/SocialAuthAdapter(10850): Selected provider is twitter 07-04 10:50:07.698: D/SocialAuthAdapter(10850): Loading keys and secrets from configuration 07-04 10:50:07.758: I/SocialAuthConfig(10850): Loading application configuration 07-04 10:50:07.758: D/SocialAuthAdapter(10850): Starting webview for authentication 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugins 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.FeedPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Loading plugin :: org.brickred.socialauth.plugin.twitter.AlbumsPluginImpl 07-04 10:50:07.828: I/TwitterImpl(10850): Determining URL for redirection 07-04 10:50:07.839: I/OAuth1(10850): Determining URL for redirection 07-04 10:50:08.079: I/dalvikvm(10850): Jit: resizing JitTable from 8192 to 16384 07-04 10:50:08.659: D/SocialAuthError(10850): org.brickred.socialauth.exception.SocialAuthConfigurationException: Application keys are not correct. The server running the application should be same that was registered to get the keys.


here is how I am connecting:

adapter.addCallBack(Provider.TWITTER, "http://www.mapamoto.com/start.php "); adapter.authorize(getActivity(), Provider.TWITTER);

here are my keys so you can try

twitter

twitter.com.consumer_key = 0kVDSS4tHYPwG3VuOi9LCQVaW twitter.com.consumer_secret = 0Gp08wJjHTz9Y9xuAiAWW5ngzLEtSAVPDRhlwWO0xiCR7p7Quw

On Fri, Jul 4, 2014 at 8:47 AM, Christian Levis < christian.levis@gmail.com> wrote:

I have setting to read write and direct message

Sent from my iPhone

On Jul 4, 2014, at 3:04 AM, vineetmobile notifications@github.com wrote:

Hi

Have you check read/write access

— Reply to this email directly or view it on GitHub https://github.com/3pillarlabs/socialauth-android/issues/28#issuecomment-48014339 .

Tanayc commented 10 years ago

I am getting the same 'URL authentication ' error with SSLHandshakeException. I am also getting a 'Token error' for facebook provider. It started showing up recently and before this the functionality was working as expected. Any way to work around this?

clevis240 commented 10 years ago

Things to try (1) make sure you have the latest jar for the socialauth library; (2) make sure the time of your device is set correctly - i solved the issue by simply changing my phone to the correct timezone

On Fri, Jul 18, 2014 at 5:19 AM, Tanay notifications@github.com wrote:

I am getting the same 'URL authentication ' error with SSLHandshakeException. I am also getting a 'Token error' for facebook provider. It started showing up recently and before this the functionality was working as expected. Any way to work around this?

— Reply to this email directly or view it on GitHub https://github.com/3pillarlabs/socialauth-android/issues/28#issuecomment-49411321 .

Tanayc commented 10 years ago

I am using the socialauthandroid-sdk-3.2 version. I am not using a device and currently using the emulator for verification. Could you please let me know where I could find the latest version of the library. Have the keys in oauth_consumer.properties updated? I think this might be causing the issue

Tanayc commented 10 years ago

Still getting an error..have tried with self generated twitter and facebook API keys. Replaced the corresponding keys in the oauth_consumer.properties file. Getting a null secret value for facebook in connectProvider in SocialAuthAdapter, Are there any additional steps to configure the new keys other than generating them on the respective site and replacing in the properties file? As this was working before with the keys provided as part of socialauthandroid-sdk-3.2 version, it would be great if I could get this working.

dfdumaresq commented 9 years ago

has there been any progress on this? I'm getting the same error.

clevis240 commented 9 years ago

I was able to fix the issue. It ended up being related to the time displayed on my device. Here's how I did it. On my WIFI only device the timezone was set to GMT or +0. I am in New York and so on Eastern Standard Time. When I changed the time zone to Eastern Standard time, the time moved back 4 hours. Once I reset the time to the correct time, in the correct time zone, the dialog loaded.

On Sun, Feb 15, 2015 at 11:43 PM, dfdumaresq notifications@github.com wrote:

has there been any progress on this? I'm getting the same error.

— Reply to this email directly or view it on GitHub https://github.com/3pillarlabs/socialauth-android/issues/28#issuecomment-74459337 .

ismcagdas commented 9 years ago

In my case, it was related to empty callback url in twitter api settings.

clipboard02